#include "QSigExFlux2Events.h"
#include "QSigExF2EDataHolder.h"
#include "QSigExDis.h"
#include "QSigExDisTF.h"
#include "TList.h"
#include "debugger.h"
ClassImp(QSigExFlux2Events)
void QSigExFlux2Events::FormatDir()
{
PRINTF2(this,"\tvoid QSigExFlux2Events::FormatDir()\n")
try{
if(!(fF2EDir=(TDirectory*)fMyDir->Get("Physics"))){
fF2EDir=fMyDir->mkdir("Physics","Physics");
}
if(!FindObjKey("Flux2Events",fF2EDir)){
fF2EDir=fF2EDir->mkdir("Flux2Events","Flux2Events");
}
}catch(int e){
cout << "Exception handled by QSigExFlux2Events::FormatDir\n";
throw e;
}
}
void QSigExFlux2Events::CleanDir()
{
PRINTF2(this,"\tvoid QSigExFlux2Events::CleanDir()\n")
try{
if((fF2EDir=(TDirectory*)fMyDir->Get("Physics"))){
DelObjsKeys("Flux2Events",fF2EDir);
}
fF2EDir=NULL;
}catch(int e){
cout << "Exception handled by QSigExFlux2Events::CleanDir\n";
throw e;
}
}
void QSigExFlux2Events::ClearCardBuf()
{
fFlux2EventsCard.Clear();
}
void QSigExFlux2Events::LoadCardFile(const Char_t* cardfilename)
{
PRINTF4(this,"\tvoid QSigExFlux2Events::LoadCardFile(const Char_t* cardfilename<",
cardfilename,">)\n")
try{
if(cardfilename){
fReader.SetFilename(cardfilename);
fReader.SetKeyword("flux2events");
fFlux2EventsCard=fReader.GetMany(0);
}
}catch(int e){
cout << "Exception handled by QSigExFlux2Events::LoadCardFile\n";
throw e;
}
}
void QSigExFlux2Events::GetFluxToEventMapping()
{
try{
const Int_t minfields = 7;
const Int_t maxfields = 9;
const Int_t activeindex = 1;
const Int_t classindex = 2;
const Int_t nameindex = 3;
const Int_t objectindex = 4;
const Int_t fileindex = 5;
const Int_t xfluxindex = 6;
const Int_t yfluxindex = 7;
const Int_t zfluxindex = 8;
TDirectory* flux2eventsdir;
TDirectory* inputspdir;
QList<TString> inputs;
Int_t ninputs;
TNamed* nbuf;
for(Int_t i=0;i<fFlux2EventsCard.Count();i++){
const QList<TString> anEntry = fFlux2EventsCard[i];
CheckCardNFields(anEntry.Count(),minfields,maxfields);
QSigExDis* flux2evtsbuf=NULL;
if(anEntry[classindex]=="TF1"){
flux2evtsbuf=new QSigExDisTF(anEntry[classindex], anEntry[fileindex], anEntry[objectindex]);
}
else {
cout << "<QSigExFlux2Events::GetFluxToEventMapping> ERROR: only implemented for TF1 objects." << endl;
throw 9014;
}
if(flux2evtsbuf){
flux2evtsbuf->SetName(anEntry[nameindex].Data());
flux2eventsdir = fF2EDir->mkdir(anEntry[nameindex].Data());
nbuf=new TNamed(ClassName(),"Class Owner Identifier");
flux2eventsdir->Add(nbuf);
flux2eventsdir->Add(flux2evtsbuf);
inputs.Clear();
for(Int_t j=xfluxindex; j<anEntry.Count(); j++){
inputs+=anEntry[j];
}
ninputs=inputs.Count();
inputspdir=flux2eventsdir->mkdir("Inputs");
for(Int_t j=0;j<ninputs;j++){
nbuf=new TNamed(((TString)"Input ")+(long int)(j),inputs[j]);
inputspdir->Add(nbuf);
}
}
}
}catch(Int_t e){
cout << "Exception handled by QSigExFlux2Events::GetFluxToEventMapping\n";
throw e;
}
}
Int_t QSigExFlux2Events::Get()
{
PRINTF2(this,"\tInt_t QSigExFlux2Events::Get()\n")
try{
FormatDir();
GetFluxToEventMapping();
TDirectory *dirbuf;
QSigExF2EDataHolder f2edataholder;
fF2EList = new TList;
if(fF2EDir){
GetDirs(fF2EList, fF2EDir);
f2edataholder.AddMapping(fF2EList);
}
}catch(Int_t e){
cout << "Exception handled by QSigExFlux2Events::Get\n";
throw e;
}
return 0;
}
#include "debugger.h"
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.