//______________________________________________________________________________
AliDetectorTag::AliDetectorTag()
{
+ // Default constructor
fITS = 0;
fTPC = 0;
fTRD = 0;
}
//______________________________________________________________________________
-AliDetectorTag::AliDetectorTag(AliDetectorTag *DetTag)
+AliDetectorTag::AliDetectorTag(const AliDetectorTag & detTag) :
+ TObject(detTag)
{
// DetectorTag copy constructor
- SetITS(DetTag->GetITS());
- SetTPC(DetTag->GetTPC());
- SetTRD(DetTag->GetTRD());
- SetTOF(DetTag->GetTOF());
- SetHMPID(DetTag->GetHMPID());
- SetPHOS(DetTag->GetPHOS());
- SetZDC(DetTag->GetZDC());
- SetMUON(DetTag->GetMUON());
- SetABSORBER(DetTag->GetABSORBER());
- SetPMD(DetTag->GetPMD());
- SetRICH(DetTag->GetRICH());
- SetEMCAL(DetTag->GetEMCAL());
- SetVZERO(DetTag->GetVZERO());
- SetTZERO(DetTag->GetTZERO());
+ SetITS(detTag.GetITS());
+ SetTPC(detTag.GetTPC());
+ SetTRD(detTag.GetTRD());
+ SetTOF(detTag.GetTOF());
+ SetHMPID(detTag.GetHMPID());
+ SetPHOS(detTag.GetPHOS());
+ SetZDC(detTag.GetZDC());
+ SetMUON(detTag.GetMUON());
+ SetABSORBER(detTag.GetABSORBER());
+ SetPMD(detTag.GetPMD());
+ SetRICH(detTag.GetRICH());
+ SetEMCAL(detTag.GetEMCAL());
+ SetVZERO(detTag.GetVZERO());
+ SetTZERO(detTag.GetTZERO());
}
//______________________________________________________________________________
AliDetectorTag::~AliDetectorTag()
{
+ // Destructor
}
//-------------------------------------------------------------------------
#include "TObject.h"
-#include "TClonesArray.h"
//______________________________________________________________________________
class AliDetectorTag : public TObject
{
- private:
- Bool_t fITS; //ITS active = 1
- Bool_t fTPC; //TPC active = 1
- Bool_t fTRD; //TRD active = 1
- Bool_t fTOF; //TOF active = 1
- Bool_t fHMPID; //HMPID active = 1
- Bool_t fPHOS; //PHOS active = 1
- Bool_t fZDC; //ZDC active = 1
- Bool_t fMUON; //MUON active = 1
- Bool_t fABSORBER; //ABSORBER active = 1
- Bool_t fPMD; //PMD active = 1
- Bool_t fRICH; //RICH active = 1
- Bool_t fEMCAL; //EMCAL active = 1
- Bool_t fVZERO; //VZERO active = 1
- Bool_t fTZERO; //TZERO active = 1
-
public:
AliDetectorTag();
- AliDetectorTag(AliDetectorTag *t);
+ AliDetectorTag(const AliDetectorTag & t);
virtual ~AliDetectorTag();
void SetITS(Int_t n) {fITS = n;}
void SetVZERO(Int_t n) {fVZERO = n;}
void SetTZERO(Int_t n) {fTZERO = n;}
- Bool_t GetITS() {return fITS;}
- Bool_t GetTPC() {return fTPC;}
- Bool_t GetTRD() {return fTRD;}
- Bool_t GetTOF() {return fTOF;}
- Bool_t GetHMPID() {return fHMPID;}
- Bool_t GetPHOS() {return fPHOS;}
- Bool_t GetZDC() {return fZDC;}
- Bool_t GetMUON() {return fMUON;}
- Bool_t GetABSORBER() {return fABSORBER;}
- Bool_t GetPMD() {return fPMD;}
- Bool_t GetRICH() {return fRICH;}
- Bool_t GetEMCAL() {return fEMCAL;}
- Bool_t GetVZERO() {return fVZERO;}
- Bool_t GetTZERO() {return fTZERO;}
+ Bool_t GetITS() const {return fITS;}
+ Bool_t GetTPC() const {return fTPC;}
+ Bool_t GetTRD() const {return fTRD;}
+ Bool_t GetTOF() const {return fTOF;}
+ Bool_t GetHMPID() const {return fHMPID;}
+ Bool_t GetPHOS() const {return fPHOS;}
+ Bool_t GetZDC() const {return fZDC;}
+ Bool_t GetMUON() const {return fMUON;}
+ Bool_t GetABSORBER() const {return fABSORBER;}
+ Bool_t GetPMD() const {return fPMD;}
+ Bool_t GetRICH() const {return fRICH;}
+ Bool_t GetEMCAL() const {return fEMCAL;}
+ Bool_t GetVZERO() const {return fVZERO;}
+ Bool_t GetTZERO() const {return fTZERO;}
+ private:
+ Bool_t fITS; //ITS active = 1
+ Bool_t fTPC; //TPC active = 1
+ Bool_t fTRD; //TRD active = 1
+ Bool_t fTOF; //TOF active = 1
+ Bool_t fHMPID; //HMPID active = 1
+ Bool_t fPHOS; //PHOS active = 1
+ Bool_t fZDC; //ZDC active = 1
+ Bool_t fMUON; //MUON active = 1
+ Bool_t fABSORBER; //ABSORBER active = 1
+ Bool_t fPMD; //PMD active = 1
+ Bool_t fRICH; //RICH active = 1
+ Bool_t fEMCAL; //EMCAL active = 1
+ Bool_t fVZERO; //VZERO active = 1
+ Bool_t fTZERO; //TZERO active = 1
+
ClassDef(AliDetectorTag,1) //(ClassName, ClassVersion)
};
//______________________________________________________________________________
TObject(),
fAliceEventId(0),
fGUID(0),
+ fsize(0),
+ fmd5(0),
+ fturl(0),
fNumberOfParticipants(-10),
fImpactParameter(-10.0),
fPrimaryVertexFlag(-1),
SetEventId(EvTag.GetEventId());
SetGUID(EvTag.GetGUID());
+ SetMD5(EvTag.GetMD5());
+ SetTURL(EvTag.GetTURL());
+ SetSize(EvTag.GetSize());
+
SetNumOfParticipants(EvTag.GetNumOfParticipants());
SetImpactParameter(EvTag.GetImpactParameter());
SetEventId(EvTag.GetEventId());
SetGUID(EvTag.GetGUID());
+ SetMD5(EvTag.GetMD5());
+ SetTURL(EvTag.GetTURL());
+ SetSize(EvTag.GetSize());
+
SetNumOfParticipants(EvTag.GetNumOfParticipants());
SetImpactParameter(EvTag.GetImpactParameter());
void SetEventId(Int_t Pid) {fAliceEventId = Pid;}
void SetGUID(const char *Pid) {fGUID = Pid;}
+ void SetMD5(const char *Pid) {fmd5 = Pid;}
+ void SetTURL(const char *Pid) {fturl = Pid;}
+ void SetSize(Long64_t i) {fsize = i;}
+
void SetNumOfParticipants(Int_t P) {fNumberOfParticipants = P;}
void SetImpactParameter(Float_t Pimpact) {fImpactParameter = Pimpact;}
Int_t GetEventId() const {return fAliceEventId;}
const char *GetGUID() const {return fGUID;}
+
+ const char *GetMD5() const {return fmd5;}
+ const char *GetTURL() const {return fturl;}
+ Long64_t GetSize() const {return fsize;}
Int_t GetNumOfParticipants() const {return fNumberOfParticipants;}
Float_t GetImpactParameter() const {return fImpactParameter;}
private:
Int_t fAliceEventId; //The event id
const char *fGUID; //The unique identifier of the file
+
+ Long64_t fsize; //the size of the file
+ const char* fmd5; //another file identifier
+ const char* fturl; //the file's url
+
Int_t fNumberOfParticipants; //Number of participants
Float_t fImpactParameter; //The impact parameter
Float_t fEventPlaneAngle; //event plane info
Float_t fHBTRadii; //HBT info
- ClassDef(AliEventTag,3) //(ClassName, ClassVersion)
+ ClassDef(AliEventTag,4) //(ClassName, ClassVersion)
};
//______________________________________________________________________________
// Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch
//-----------------------------------------------------------------
-#include <stdlib.h>
-#include <Riostream.h>
-
#include "AliRunTag.h"
-#include "AliLHCTag.h"
#include "AliDetectorTag.h"
#include "AliEventTag.h"
+class AliLHCTag;
+
ClassImp(AliRunTag)
TClonesArray *AliRunTag::fgEvents = 0;
//______________________________________________________________________________
AliRunTag::AliRunTag()
{
+ //Default constructor
if (!fgEvents) fgEvents = new TClonesArray("AliEventTag", 1000);
fEventTag = fgEvents;
fNumEvents = 0;
//______________________________________________________________________________
AliRunTag::~AliRunTag()
{
+ //Default destructor
+ delete fEventTag;
+ delete fDetectorTag;
}
//______________________________________________________________________________
void AliRunTag::SetLHCTag(Float_t lumin, char *type)
{
+ //Setter for the LHC tags
fLHCTag.SetLHCTag(lumin,type);
}
//______________________________________________________________________________
-void AliRunTag::SetDetectorTag(AliDetectorTag *DetTag)
+void AliRunTag::SetDetectorTag(const AliDetectorTag &DetTag)
{
+ //Setter for the detector tags
TClonesArray &detectors = *fDetectorTag;
new(detectors[fNumDetectors++]) AliDetectorTag(DetTag);
}
//______________________________________________________________________________
void AliRunTag::AddEventTag(const AliEventTag & EvTag)
{
+ //Adds an entry to the event tag TClonesArray
TClonesArray &events = *fEventTag;
new(events[fNumEvents++]) AliEventTag(EvTag);
}
//______________________________________________________________________________
void AliRunTag::Clear(const char *)
{
+ //Resets the number of events and detectors
fNumEvents = 0;
fNumDetectors = 0;
}
// Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch
//-------------------------------------------------------------------------
-#include <stdlib.h>
-#include <Riostream.h>
-
#include "TObject.h"
-#include "TClonesArray.h"
-#include "AliEventTag.h"
#include "AliLHCTag.h"
-#include "AliDetectorTag.h"
+
+class AliEventTag;
+class AliDetectorTag;
//______________________________________________________________________________
class AliRunTag : public TObject
{
- private:
- Int_t fAliceRunId; //the run id
- Float_t fAliceMagneticField; //value of the magnetic field
- Int_t fAliceRunStartTime; //run start date
- Int_t fAliceRunStopTime; //run stop date
- Int_t fAliceReconstructionVersion; //reco version
- Bool_t fAliceRunQuality; //validation script
- Float_t fAliceBeamEnergy; //beam energy cm
- Char_t fAliceBeamType[5]; //run type (pp, AA, pA)
- Int_t fAliceCalibrationVersion; //calibration version
-
- Int_t fAliceDataType; //0: simulation -- 1: data
-
- Int_t fNumEvents; //number of events per file
- Int_t fNumDetectors; //number of detector configs per file
- TClonesArray *fEventTag; //array with all event tags
- TClonesArray *fDetectorTag; //array with all the detector tags
-
- AliLHCTag fLHCTag;
-
- static TClonesArray *fgEvents;
- static TClonesArray *fgDetectors;
-
public:
AliRunTag();
virtual ~AliRunTag();
void SetRecoVersion(Int_t Pn) {fAliceReconstructionVersion = Pn;}
void SetRunQuality(Int_t Pn) {fAliceRunQuality = Pn;}
void SetBeamEnergy(Float_t PE) {fAliceBeamEnergy = PE;}
- void SetBeamType(char *Ptype) {strcpy(fAliceBeamType,Ptype);}
+ void SetBeamType(const char *Ptype) {fAliceBeamType = Ptype;}
void SetCalibVersion(Int_t Pn) {fAliceCalibrationVersion = Pn;}
void SetDataType(Int_t i) {fAliceDataType = i;}
void SetNEvents(Int_t Pn) { fNumEvents = Pn; }
void SetLHCTag(Float_t Plumin, char *type);
- void SetDetectorTag(AliDetectorTag *t);
+ void SetDetectorTag(const AliDetectorTag &t);
void AddEventTag(const AliEventTag &t);
void Clear(const char * opt = "");
- Int_t GetRunId() {return fAliceRunId;}
- Float_t GetMagneticField() {return fAliceMagneticField;}
- Int_t GetRunStartTime() {return fAliceRunStartTime;}
- Int_t GetRunStopTime() {return fAliceRunStopTime;}
- Int_t GetRecoVersion() {return fAliceReconstructionVersion;}
- Int_t GetRunQuality() {return fAliceRunQuality;}
- Float_t GetBeamEnergy() {return fAliceBeamEnergy;}
- char *GetBeamType() {return fAliceBeamType;}
- Int_t GetCalibVersion() {return fAliceCalibrationVersion;}
+ Int_t GetRunId() const {return fAliceRunId;}
+ Float_t GetMagneticField() const {return fAliceMagneticField;}
+ Int_t GetRunStartTime() const {return fAliceRunStartTime;}
+ Int_t GetRunStopTime() const {return fAliceRunStopTime;}
+ Int_t GetRecoVersion() const {return fAliceReconstructionVersion;}
+ Int_t GetRunQuality() const {return fAliceRunQuality;}
+ Float_t GetBeamEnergy() const {return fAliceBeamEnergy;}
+ const char *GetBeamType() const {return fAliceBeamType;}
+ Int_t GetCalibVersion() const {return fAliceCalibrationVersion;}
- Int_t GetDataType() {return fAliceDataType;}
+ Int_t GetDataType() const {return fAliceDataType;}
Int_t GetNEvents() const {return fNumEvents;}
- AliLHCTag *GetLHCTag() { return &fLHCTag; }
+ AliLHCTag *GetLHCTag() {return &fLHCTag; }
TClonesArray *GetEventTags() const {return fEventTag;}
+ private:
+ Int_t fAliceRunId; //the run id
+ Float_t fAliceMagneticField; //value of the magnetic field
+ Int_t fAliceRunStartTime; //run start date
+ Int_t fAliceRunStopTime; //run stop date
+ Int_t fAliceReconstructionVersion; //reco version
+ Bool_t fAliceRunQuality; //validation script
+ Float_t fAliceBeamEnergy; //beam energy cm
+ const char *fAliceBeamType; //run type (pp, AA, pA)
+ Int_t fAliceCalibrationVersion; //calibration version
+
+ Int_t fAliceDataType; //0: simulation -- 1: data
+
+ Int_t fNumEvents; //number of events per file
+ Int_t fNumDetectors; //number of detector configs per file
+ TClonesArray *fEventTag; //array with all event tags
+ TClonesArray *fDetectorTag; //array with all the detector tags
+
+ AliLHCTag fLHCTag; //LHC tag object
+
+ static TClonesArray *fgEvents; //static Event tag TClonesArray
+ static TClonesArray *fgDetectors; //static Detector tag TClonesArray
+
+
ClassDef(AliRunTag,1) //(ClassName, ClassVersion)
};
//______________________________________________________________________________
fHost = "";
fPort = 0;
fStorage = 0;
- // fresult = 0;
}
//______________________________________________________________________________
{
//==============Default constructor for a AliTagCreator==================
fStorage = 0;
- // fresult = 0;
fgridpath = "";
fHost = host;
fUser = username;
{
//==============Default constructor for a AliTagCreator==================
fStorage = 0;
- // fresult = 0;
fgridpath = "";
fHost = host;
fUser = username;
TString alienUrl;
const char *guid;
-
+ const char *md5;
+ const char *turl;
+ Long64_t size = -1;
+
Int_t counter = 0;
for(Int_t i = 0; i < nEntries; i++)
{
alienUrl = fresult->GetKey(i,"turl");
guid = fresult->GetKey(i,"guid");
+ if(fresult->GetKey(i,"size"))
+ size = atol (fresult->GetKey(i,"size"));
+ md5 = fresult->GetKey(i,"md5");
+ turl = fresult->GetKey(i,"turl");
+ if(md5 && !strlen(guid))
+ md5 = 0;
+ if(guid && !strlen(guid))
+ guid = 0;
+
TFile *f = TFile::Open(alienUrl,"READ");
- CreateTag(f,guid,counter);
+ //CreateTag(f,guid,counter);
+ CreateTag(f,guid,md5,turl,size,counter);
f->Close();
delete f;
counter += 1;
//_____________________________________________________________________________
-void AliTagCreator::CreateTag(TFile* file, const char *guid, Int_t Counter)
+//void AliTagCreator::CreateTag(TFile* file, const char *guid, Int_t Counter)
+void AliTagCreator::CreateTag(TFile* file, const char *guid, const char *md5, const char *turl, Long64_t size, Int_t Counter)
{
// Creates the tags for all the events in a given ESD file
Int_t ntrack;
Float_t maxPt = .0, meanPt = .0, totalP = .0;
AliRunTag *tag = new AliRunTag();
- AliDetectorTag *detTag = new AliDetectorTag();
AliEventTag *evTag = new AliEventTag();
TTree ttag("T","A Tree with event tags");
TBranch * btag = ttag.Branch("AliTAG", "AliRunTag", &tag);
evTag->SetEventId(iEventNumber+1);
evTag->SetGUID(guid);
+ evTag->SetMD5(md5);
+ evTag->SetTURL(turl);
+ evTag->SetSize(size);
evTag->SetVertexX(vertexIn->GetXv());
evTag->SetVertexY(vertexIn->GetYv());
evTag->SetVertexZ(vertexIn->GetZv());
delete esd;
delete tag;
- delete detTag;
delete evTag;
}
TString fgridpath; //the alien location of the tag files
Int_t fPort; //the defined port for the host login
Int_t fStorage; //0:local - 1:grid
- // TGridResult *fresult; //the results from the grid query
-
- void CreateTag(TFile* file, const char *guid, Int_t Counter);
-
+
+ //void CreateTag(TFile* file, const char *guid, Int_t Counter);
+ void CreateTag(TFile* file, const char *guid, const char *md5, const char *turl, Long64_t size, Int_t Counter);
+
ClassDef(AliTagCreator,0)
};