]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Initial commit
authorkir <kir@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 26 Jun 2006 17:03:29 +0000 (17:03 +0000)
committerkir <kir@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 26 Jun 2006 17:03:29 +0000 (17:03 +0000)
RICH/AliRICHPreprocessor.cxx [new file with mode: 0644]
RICH/AliRICHPreprocessor.h [new file with mode: 0644]

diff --git a/RICH/AliRICHPreprocessor.cxx b/RICH/AliRICHPreprocessor.cxx
new file mode 100644 (file)
index 0000000..02713e9
--- /dev/null
@@ -0,0 +1,55 @@
+#include "AliRICHPreprocessor.h" //header
+
+#include <AliCDBMetaData.h>
+#include <AliDCSValue.h>
+#include "AliLog.h"
+#include "AliTestDataDCS.h"
+
+#include <TTimeStamp.h>
+
+//
+// This class is an example for a simple preprocessor.
+// It takes data from DCS and passes it to the class AliTestDataDCS, which
+// reformats its. This class is then written to the CDB.
+//
+
+ClassImp(AliRICHPreprocessor)
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+void AliRICHPreprocessor::Initialize(Int_t run, UInt_t startTime,UInt_t endTime)
+{
+
+  AliPreprocessor::Initialize(run, startTime, endTime);
+
+  Log(Form("\n\tRun %d \n\tStartTime %s \n\tEndTime %s", run,
+               TTimeStamp(startTime).AsString(),
+               TTimeStamp(endTime).AsString()));
+
+}
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+UInt_t AliRICHPreprocessor::Process(TMap* pDcsMap)
+{
+
+  if(!pDcsMap)  return 0;
+
+  const char* fileName = GetFile(kDAQ, "PEDESTALS", "GDC");
+  if(fileName) AliInfo(Form("Got the file %s, now we can extract some values.", fileName));
+
+  TList* list = GetFileSources(kDAQ, "DRIFTVELOCITY");
+  if (list){
+    AliInfo("The following sources produced files with the id DRIFTVELOCITY");
+    list->Print();
+    delete list;
+  }
+
+  //Now we have to store the final CDB file
+  AliCDBMetaData metaData;
+       metaData.SetBeamPeriod(0);
+       metaData.SetResponsible("RICH expert");
+       metaData.SetComment("This data produced by AliRICHPreprocessor from simulated input.");
+
+  UInt_t result = Store(pTempFreon, &metaData); //use AliPreprocessor::Store(), not allowed to use AliCDBManager directly
+
+  return result;
+}
+
diff --git a/RICH/AliRICHPreprocessor.h b/RICH/AliRICHPreprocessor.h
new file mode 100644 (file)
index 0000000..cbc33b2
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef AliRICHPreprocessor_h
+#define AliRICHPreprocessor_h
+
+#include <AliPreprocessor.h> //base class
+
+// test preprocessor that writes data to AliTestDataDCS
+
+class AliTestDataDCS;
+
+class AliRICHPreprocessor : public AliPreprocessor
+{
+public:
+           AliRICHPreprocessor(AliShuttleInterface* pShuttle):AliPreprocessor("RICH",pShuttle)  {}
+  virtual ~AliRICHPreprocessor(                             )                                   {}
+
+protected:
+  virtual void   Initialize(Int_t run, UInt_t startTime, UInt_t endTime);
+  virtual UInt_t Process   (TMap* pDcsMap                              );
+  ClassDef(AliRICHPreprocessor, 0);
+};
+
+#endif