#101358: In complete events in runs 195389 and 195531. Propagation of DAQ information...
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 15 May 2013 13:27:51 +0000 (13:27 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 15 May 2013 13:27:51 +0000 (13:27 +0000)
STEER/ESD/AliESDEvent.cxx
STEER/ESD/AliESDEvent.h
STEER/STEER/AliReconstruction.cxx

index 8dd0cff..ce8006a 100644 (file)
@@ -166,7 +166,9 @@ AliESDEvent::AliESDEvent():
   fTOFHeader(0),
   fCentrality(0),
   fEventplane(0),
-  fDetectorStatus(0xFFFFFFFF)
+  fDetectorStatus(0xFFFFFFFF),
+  fDAQDetectorPattern(0xFFFF),
+  fDAQAttributes(0xFFFF)
   #ifdef MFT_UPGRADE
 //  , fESDMFT(0)
   #endif
@@ -215,7 +217,9 @@ AliESDEvent::AliESDEvent(const AliESDEvent& esd):
   fTOFHeader(new AliTOFHeader(*esd.fTOFHeader)),
   fCentrality(new AliCentrality(*esd.fCentrality)),
   fEventplane(new AliEventplane(*esd.fEventplane)),
-  fDetectorStatus(esd.fDetectorStatus)
+  fDetectorStatus(esd.fDetectorStatus),
+  fDAQDetectorPattern(esd.fDAQDetectorPattern),
+  fDAQAttributes(esd.fDAQAttributes)
   #ifdef MFT_UPGRADE
 //  , fESDMFT(new AliESDMFT(*esd.fESDMFT))
   #endif
@@ -359,6 +363,8 @@ AliESDEvent & AliESDEvent::operator=(const AliESDEvent& source) {
   fUseOwnList = source.fUseOwnList;
   
   fDetectorStatus = source.fDetectorStatus;
+  fDAQDetectorPattern = source.fDAQDetectorPattern;
+  fDAQAttributes = source.fDAQAttributes;
 
   return *this;
 }
@@ -407,7 +413,8 @@ void AliESDEvent::Reset()
   // Reset the standard contents
   ResetStdContent(); 
   fDetectorStatus = 0xFFFFFFFF;
-
+  fDAQDetectorPattern = 0xFFFF;
+  fDAQAttributes = 0xFFFF;
   //  reset for the old data without AliESDEvent...
   if(fESDOld)fESDOld->Reset();
   if(fESDFriendOld){
@@ -1608,6 +1615,8 @@ void AliESDEvent::WriteToTree(TTree* tree) const {
     }
   }
   tree->Branch("fDetectorStatus",(void*)&fDetectorStatus,"fDetectorStatus/l");
+  tree->Branch("fDAQDetectorPattern",(void*)&fDAQDetectorPattern,"fDAQDetectorPattern/i");
+  tree->Branch("fDAQAttributes",(void*)&fDAQAttributes,"fDAQAttributes/i");
 }
 
 
@@ -1708,6 +1717,8 @@ void AliESDEvent::ReadFromTree(TTree *tree, Option_t* opt){
       fESDObjects->Delete();
       fESDObjects = connectedList;
       tree->SetBranchAddress("fDetectorStatus",&fDetectorStatus); //PH probably redundant
+      tree->SetBranchAddress("fDAQDetectorPattern",&fDAQDetectorPattern);
+      tree->SetBranchAddress("fDAQAttributes",&fDAQAttributes);
       GetStdContent(); 
       fOldMuonStructure = fESDObjects->TestBit(BIT(23));
       fConnected = true;
@@ -1772,6 +1783,8 @@ void AliESDEvent::ReadFromTree(TTree *tree, Option_t* opt){
       }
     }
     tree->SetBranchAddress("fDetectorStatus",&fDetectorStatus);
+    tree->SetBranchAddress("fDAQDetectorPattern",&fDAQDetectorPattern);
+    tree->SetBranchAddress("fDAQAttributes",&fDAQAttributes);
     GetStdContent();
     // when reading back we are not owner of the list 
     // must not delete it
@@ -1808,6 +1821,8 @@ void AliESDEvent::ReadFromTree(TTree *tree, Option_t* opt){
       }
     }
     tree->SetBranchAddress("fDetectorStatus",&fDetectorStatus);
+    tree->SetBranchAddress("fDAQDetectorPattern",&fDAQDetectorPattern);
+    tree->SetBranchAddress("fDAQAttributes",&fDAQAttributes);
     GetStdContent();
     // when reading back we are not owner of the list 
     // must not delete it
index 01a6f3a..3224cca 100644 (file)
@@ -502,6 +502,10 @@ public:
   ULong_t GetDetectorStatus() const {return fDetectorStatus;}
   Bool_t IsDetectorOn(ULong_t detMask) const {return (fDetectorStatus&detMask)>0;}
 
+  void SetDAQDetectorPattern(UInt_t pattern) {fDAQDetectorPattern = pattern;}
+  void SetDAQAttributes(UInt_t attributes) {fDAQAttributes = attributes;}
+  UInt_t GetDAQDetectorPattern() const {return fDAQDetectorPattern;}
+  UInt_t GetDAQAttributes() const {return fDAQAttributes;}
   
 protected:
   AliESDEvent(const AliESDEvent&);
@@ -561,8 +565,10 @@ protected:
   AliEventplane *fEventplane; //! Event plane for AA collision
 
   ULong64_t fDetectorStatus; // set detector event status bit for good event selection
+  UInt_t fDAQDetectorPattern; // Detector pattern from DAQ: bit 0 is SPD, bit 4 is TPC, etc. See event.h
+  UInt_t fDAQAttributes; // Third word of attributes from DAQ: bit 7 corresponds to HLT decision 
 
-  ClassDef(AliESDEvent,18)  //ESDEvent class 
+  ClassDef(AliESDEvent,19)  //ESDEvent class 
 };
 #endif 
 
index 6eaaa94..828363d 100644 (file)
@@ -1971,6 +1971,11 @@ Bool_t AliReconstruction::ProcessEvent(Int_t iEvent)
     // fill Event header information from the RawEventHeader
     if (fRawReader){FillRawEventHeaderESD(fesd);}
     if (fRawReader){FillRawEventHeaderESD(fhltesd);}
+    if (fRawReader){
+      // Store DAQ detector pattern and attributes
+      fesd->SetDAQDetectorPattern(fRawReader->GetDetectorPattern()[0]);
+      fesd->SetDAQAttributes(fRawReader->GetAttributes()[2]);
+    }
 
     fesd->SetRunNumber(fRunLoader->GetHeader()->GetRun());
     fhltesd->SetRunNumber(fRunLoader->GetHeader()->GetRun());