Raw-reader is instantiated via the newly create factory method
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 2 Apr 2008 16:24:25 +0000 (16:24 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 2 Apr 2008 16:24:25 +0000 (16:24 +0000)
STEER/AliQADataMakerSteer.cxx

index a94e29e..cd5825e 100644 (file)
@@ -364,15 +364,7 @@ Bool_t AliQADataMakerSteer::Init(const AliQA::TASKINDEX_t taskIndex, const char
        
        if (taskIndex == AliQA::kRAWS) { 
                if (!fRawReader) {
-                       TString fileName(input);
-                       if (fileName.EndsWith("/")) {
-                               fRawReader = new AliRawReaderFile(fileName);
-                       } else if (fileName.EndsWith(".root")) {
-                               fRawReader = new AliRawReaderRoot(fileName);
-                       } else if (!fileName.IsNull()) {
-                               fRawReader = new AliRawReaderDate(fileName);
-                               fRawReader->SelectEvents(7);
-                       }
+                       fRawReader = AliRawReader::Create(input);
                }
            if ( ! fRawReader ) 
                        return kFALSE ;