AliTagCreator(),
fChain(new TChain("esdTree")), fGUIDList(new TList()),
fMD5List(new TList()), fTURLList(new TList()),
+ fBranches(""),
meminfo(new MemInfo_t) {
//==============Default constructor for a AliESDTagCreator================
}
AliInfo(Form("ESD chain created......."));
AliInfo(Form("Chain entries: %d",fChain->GetEntries()));
+ //
+ // Switch of branches on user request
+ SwitchOffBranches();
+
CreateTag(fChain,"grid");
return kTRUE;
AliInfo(Form("ESD chain created......."));
AliInfo(Form("Chain entries: %d",fChain->GetEntries()));
+
+ //
+ // Switch of branches on user request
+ SwitchOffBranches();
+
CreateTag(fChain,"local");
return kTRUE;
AliInfo(Form("ESD chain created......."));
AliInfo(Form("Chain entries: %d",fChain->GetEntries()));
+
+ //
+ // Switch of branches on user request
+ SwitchOffBranches();
+
CreateTag(fChain,"proof");
return kTRUE;
Int_t fVertexflag;
Int_t iRunNumber = 0;
TString fVertexName("default");
+
+ AliRunTag *tag = new AliRunTag();
+ AliEventTag *evTag = new AliEventTag();
+ TTree ttag("T","A Tree with event tags");
+ TBranch * btag = ttag.Branch("AliTAG", &tag);
+ btag->SetCompressionLevel(9);
AliInfo(Form("Creating the ESD tags......."));
char fileName[256];
sprintf(fileName, "Run%d.Event%d_%d.ESD.tag.root",
- iInitRunNumber,fFirstEvent,lastEvent);
+ tag->GetRunId(),fFirstEvent,lastEvent);
AliInfo(Form("writing tags to file %s", fileName));
AliDebug(1, Form("writing tags to file %s", fileName));
TFile* ftag = TFile::Open(fileName, "recreate");
- AliRunTag *tag = new AliRunTag();
- AliEventTag *evTag = new AliEventTag();
- TTree ttag("T","A Tree with event tags");
- TBranch * btag = ttag.Branch("AliTAG", &tag);
- btag->SetCompressionLevel(9);
-
if(fLastEvent != -1) iNumberOfEvents = fLastEvent + 1;
for (Int_t iEventNumber = fFirstEvent; iEventNumber < iNumberOfEvents; iEventNumber++) {
ntrack = 0;
delete evTag;
}
+void AliESDTagCreator::SwitchOffBranches() const
+{
+ //
+ // Switch of branches on user request
+ TObjArray * tokens = fBranches.Tokenize(" ");
+ Int_t ntok = tokens->GetEntries();
+ for (Int_t i = 0; i < ntok; i++)
+ {
+ TString str = ((TObjString*) tokens->At(i))->GetString();
+ fChain->SetBranchStatus(Form("%s%s%s","*", str.Data(), "*"), 0);
+ AliInfo(Form("Branch %s switched off \n", str.Data()));
+ }
+}
void CreateESDTags(Int_t fFirstEvent, Int_t fLastEvent, TList *grpList);
+ void SetInactiveBranches(const char* branches) {fBranches = branches;}
+
Bool_t ReadGridCollection(TGridResult *result);
Bool_t ReadLocalCollection(const char *localpath);
Bool_t ReadCAFCollection(const char *filename);
void CreateTag(TChain *chain, const char* type);
void CreateTag(TFile* file, const char *guid, const char *md5, const char *turl, Long64_t size, Int_t Counter);
void CreateTag(TFile* file, const char *filepath, Int_t Counter);
-
private:
- TChain *fChain; //chain of esd files
- TList *fGUIDList; //TList of guid TObjString
- TList *fMD5List; //TList of md5 TObjString
- TList *fTURLList; //TList of turl TObjString
+ void SwitchOffBranches() const;
+ private:
+ TChain *fChain; //chain of esd files
+ TList *fGUIDList; //TList of guid TObjString
+ TList *fMD5List; //TList of md5 TObjString
+ TList *fTURLList; //TList of turl TObjString
+ TString fBranches; //List of branches to be switched off (separated by space
MemInfo_t *meminfo; //mem info
-
ClassDef(AliESDTagCreator,0)
};