]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Make it a base class only (Laurent)
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 5 Mar 2007 17:36:25 +0000 (17:36 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 5 Mar 2007 17:36:25 +0000 (17:36 +0000)
MUON/AliMUONPreprocessor.cxx
MUON/AliMUONPreprocessor.h

index 8bc207a2a55e7ee6fb68fea9bb3bf9131225413a..c44a7125e00e1ad09d7dba2c051b237d56518c70 100644 (file)
 ClassImp(AliMUONPreprocessor)
 /// \endcond
 
-const TString  AliMUONPreprocessor::fgkTrackerDetName = "MCH";
-const TString  AliMUONPreprocessor::fgkTriggerDetName = "MTR";
-
 //_____________________________________________________________________________
-AliMUONPreprocessor::AliMUONPreprocessor(const TString& detName, 
-                                         AliShuttleInterface* shuttle) 
-: AliPreprocessor(detName.Data(),shuttle), 
-//  fSubprocessors(new TObjArray[kLast])
+AliMUONPreprocessor::AliMUONPreprocessor(const char* detName, AliShuttleInterface* shuttle)
+: AliPreprocessor(detName, shuttle),
   fSubprocessors(new TObjArray())
 {
-  /// ctor. Builds the list of subtasks
-  /// Tests detector wrt to tracker or trigger to 
-  /// instantiate the correct list of subtasks, which should be : 
-  /// Tracker : 
-  /// - pedestals
-  /// - gains
-  /// - deadchannels
-  /// - gms
-  ///
-  /// Trigger : 
-  /// - masks
-  /// - lut
-  
-  if ( detName == fgkTrackerDetName ) 
-  { 
-    TString runType = shuttle->GetRunParameter("RunType");
-    if ( runType == "PEDESTAL_RUN" ) // FIXME : check the name 
-    {
-      fSubprocessors->Add(new AliMUONPedestalSubprocessor(this)); // to be called only for pedestal runs
-      Log("INFO-Will run Pedestal subprocessor");
-    }
-    else if ( runType == "ELECTRONICS_CALIBRATION_RUN" ) // FIXME : check the name 
-    {  
-      Log("WARNING-Subprocessor for gains not yet implemented");
-      //fSubprocessors->Add(new AliMUONGainSubprocessor(this)); // to be called only for gain runs
-    }
-    else if ( runType == "GMS" ) // FIXME : check the name 
-    {
-      fSubprocessors->Add(new AliMUONGMSSubprocessor(this));
-      Log("INFO-Will run GMS subprocessor");
-    }
-    else if ( runType == "PHYSICS" ) // FIXME : check the name
-    {
-      fSubprocessors->Add(new AliMUONHVSubprocessor(this)); // to be called only for physics runs
-      Log("INFO-Will run HV subprocessor");
-    }
-    else
-    {
-      Log(Form("ERROR-Unknown RunType=%",runType.Data()));
-    }
-  }
-  else if ( detName == fgkTriggerDetName ) 
-  {
-    Log("WARNING-Trigger subprocessors not yet implemented.");
-  }  
-  else 
-  { 
-    // Wrong detector name
-    Log("ERROR-Wrong detector name.");
-  }  
+  /// ctor
 }
 
 //_____________________________________________________________________________
@@ -108,6 +54,22 @@ AliMUONPreprocessor::~AliMUONPreprocessor()
   delete fSubprocessors;
 }
 
+//_____________________________________________________________________________
+void
+AliMUONPreprocessor::DeleteSubprocessors()
+{
+  /// Empty our subprocessor list
+  fSubprocessors->Delete();
+}
+
+//_____________________________________________________________________________
+void
+AliMUONPreprocessor::Add(AliMUONVSubprocessor* sub)
+{
+  /// Add a subprocessor to our list of workers
+  fSubprocessors->Add(sub);
+}
+
 //_____________________________________________________________________________
 void
 AliMUONPreprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endTime)
index bcba5a7cf01a2fe03b64324046671fa2996ec074..a2010587f63e436c81fc61aaa29eece19e43903b 100644 (file)
@@ -21,10 +21,14 @@ class TObjArray;
 
 class AliMUONPreprocessor : public AliPreprocessor
 {
-public:
-  AliMUONPreprocessor(const TString& detName, AliShuttleInterface* shuttle);
+protected:
+  AliMUONPreprocessor(const char* detName, AliShuttleInterface* shuttle);
   virtual ~AliMUONPreprocessor();
   
+  void Add(AliMUONVSubprocessor* subProcessor); 
+  void DeleteSubprocessors();
+  
+public:
   virtual void Initialize(Int_t run, UInt_t startTime, UInt_t endTime);
   virtual UInt_t Process(TMap* dcsAliasMap);
   virtual void Print(Option_t* opt="") const;
@@ -48,16 +52,12 @@ public:
   }  
   
 private:
-  // enum ESubprocessors { kPedestal=0, kGMS=1, kLast };
-  
   AliMUONPreprocessor(const AliMUONPreprocessor& rhs);
   AliMUONPreprocessor& operator=(const AliMUONPreprocessor& rhs);
   
   AliMUONVSubprocessor* Subprocessor(Int_t i) const;
   
 private:
-  static const TString  fgkTrackerDetName;  ///< The tracker detector name
-  static const TString  fgkTriggerDetName;  ///< The trigger detector name
 
   TObjArray* fSubprocessors; ///!< sub processors to execute