Introduction of the LTU config class.
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 3 Sep 2010 15:04:35 +0000 (15:04 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 3 Sep 2010 15:04:35 +0000 (15:04 +0000)
STEER/AliLTUConfig.cxx [new file with mode: 0644]
STEER/AliLTUConfig.h [new file with mode: 0644]
STEER/STEERLinkDef.h
STEER/libSTEER.pkg

diff --git a/STEER/AliLTUConfig.cxx b/STEER/AliLTUConfig.cxx
new file mode 100644 (file)
index 0000000..472cee9
--- /dev/null
@@ -0,0 +1,53 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  Class that describes a detector LTU configuration                        //
+//                                                                           //
+//                                                                           //
+//  Presently we store a subset of the LTU parameters:                       //
+//  FineDelay1 3126 # picosec                                                //
+//  FineDelay2 20459 # picosec                                               //
+//  BC_DELAY_ADD 18 # ns                                                     //
+//                                                                           //
+//  cvetan.cheshkov@cern.ch 3/9/2010                                         //
+///////////////////////////////////////////////////////////////////////////////
+
+#include <Riostream.h>
+
+#include "AliLog.h"
+#include "AliDAQ.h"
+#include "AliLTUConfig.h"
+
+ClassImp( AliLTUConfig )
+
+//_____________________________________________________________________________
+void AliLTUConfig::Print( const Option_t* ) const
+{
+   // Print
+   cout << "LTU Config:" << endl; 
+   cout << "     Detector:  " << GetDetectorName() << "(Id=" << (Int_t)fDetectorId << ")" << endl;
+   cout << "   FineDelay1:  " << fFineDelay1 << " ns" << endl;
+   cout << "   FineDelay2:  " << fFineDelay2 << " ns" << endl;
+   cout << "   BCDelayAdd:  " << fBCDelayAdd << " ns" << endl;
+}
+
+//_____________________________________________________________________________
+const char* AliLTUConfig::GetDetectorName() const
+{
+  // Get the detector name (DAQ naming scheme)
+  return AliDAQ::DetectorName((Int_t)fDetectorId);
+}
diff --git a/STEER/AliLTUConfig.h b/STEER/AliLTUConfig.h
new file mode 100644 (file)
index 0000000..653ff30
--- /dev/null
@@ -0,0 +1,67 @@
+#ifndef ALILTUCONFIG_H
+#define ALILTUCONFIG_H
+
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  Class that describes a detector LTU configuration                        //
+//                                                                           //
+//                                                                           //
+//  Presently we store a subset of the LTU parameters:                       //
+//  FineDelay1 3126 # picosec                                                //
+//  FineDelay2 20459 # picosec                                               //
+//  BC_DELAY_ADD 18 # ns                                                     //
+//                                                                           //
+//  cvetan.cheshkov@cern.ch 3/9/2010                                         //
+///////////////////////////////////////////////////////////////////////////////
+
+
+#include <TObject.h>
+
+class AliLTUConfig : public TObject {
+
+public:
+                          AliLTUConfig(): TObject(),
+                            fDetectorId(-1),
+                           fFineDelay1(0.),
+                           fFineDelay2(0.),
+                           fBCDelayAdd(0.)
+                           {}
+                          AliLTUConfig(UChar_t detectorId, Float_t fineDelay1, Float_t fineDelay2, Float_t bcDelayAdd): TObject(),
+                            fDetectorId(detectorId),
+                           fFineDelay1(fineDelay1),
+                           fFineDelay2(fineDelay2),
+                           fBCDelayAdd(bcDelayAdd)
+                           {}
+                          AliLTUConfig(AliLTUConfig & ltu): TObject(ltu),
+                            fDetectorId(ltu.fDetectorId),
+                           fFineDelay1(ltu.fFineDelay1),
+                           fFineDelay2(ltu.fFineDelay2),
+                           fBCDelayAdd(ltu.fBCDelayAdd)
+                           {}
+               virtual   ~AliLTUConfig() {}
+
+  //  Getters
+               Char_t    GetDetectorId() const { return fDetectorId; }
+           const char*   GetDetectorName() const;
+              Float_t    GetFineDelay1() const { return fFineDelay1; }
+              Float_t    GetFineDelay2() const { return fFineDelay2; }
+              Float_t    GetBCDelayAdd() const { return fBCDelayAdd; }
+
+           virtual void   Print( const Option_t* opt ="" ) const;
+
+private:
+          AliLTUConfig & operator=(const AliLTUConfig & );
+
+                Char_t    fDetectorId; // Detector ID, see AliDAQ class for more details
+               Float_t    fFineDelay1; // Fine delay in ns
+              Float_t    fFineDelay2; // Fine delay in ns
+              Float_t    fBCDelayAdd; // BC_DELAY_ADD in ns 
+
+   ClassDef( AliLTUConfig, 1 )  // LTU Configuration class
+};
+
+
+#endif
index 8c1b44a..7a984a5 100644 (file)
 
 #pragma link C++ class AliLHCClockPhase+;
 
+#pragma link C++ class AliLTUConfig+;
+
 #pragma link C++ typedef AliLHCDipValD;
 #pragma link C++ typedef AliLHCDipValI;
 #pragma link C++ typedef AliLHCDipValF;
index b716804..4c6ae93 100644 (file)
@@ -77,7 +77,8 @@ AliGRPManager.cxx \
 AliDCSArray.cxx AliLHCReader.cxx \
 AliLHCDipValT.cxx AliLHCData.cxx \
 AliCTPTimeParams.cxx AliCTPInputTimeParams.cxx \
-AliLHCClockPhase.cxx
+AliLHCClockPhase.cxx \
+AliLTUConfig.cxx
 
 HDRS:= $(SRCS:.cxx=.h)