ROOT logo
#ifndef ALITRDCALIBVIEWER_H
#define ALITRDCALIBVIEWER_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice                               */

/* $Id: AliTRDCalibViewer.h 34418 2009-08-26 15:47:50Z cblume $ */

///////////////////////////////////////////////////////////////////////////////
//                                                                           //
//  Class which implements AliBaseCalibViewer for the TRD                    //
//  used for the calibration monitor                                         //
//                                                                           //
///////////////////////////////////////////////////////////////////////////////

#include <TObject.h>
#include <TTree.h>
#include <TFile.h>
#include "TFriendElement.h"
#include "TVectorD.h"
#include "AliBaseCalibViewer.h"
class AliTRDCalDet;
class AliTRDCalPad;


class AliTRDCalibViewer : public AliBaseCalibViewer {
 public:
  AliTRDCalibViewer();
  AliTRDCalibViewer(const AliTRDCalibViewer &c);
  AliTRDCalibViewer(TTree* tree);
  AliTRDCalibViewer(const char* fileName, const char* treeName = "TRDcalibDetails");
  AliTRDCalibViewer &operator= (const AliTRDCalibViewer& param);
  virtual ~AliTRDCalibViewer();

  virtual TObjArray* GetListOfVariables(Bool_t printList = kFALSE);
  virtual TObjArray* GetListOfNormalizationVariables(Bool_t printList = kFALSE) const;

  //virtual void GetTimeInfoOCDB(const Char_t* runList, const Char_t* outFile,
                               //Int_t firstRun, Int_t lastRun, UInt_t infoFlags,
                               //const Char_t* ocdbStorage);
  // extract pad level OCDB information for a run list and dump it into a tree
  Bool_t DumpOCDBtoTreeDetails(const Char_t* runListFilename, const Char_t* outFilename,
			       Int_t firstRun, Int_t lastRun, const Char_t* storage,
                               Int_t version = -1, Int_t subVersion = -1,
                               Bool_t getCalibs = kTRUE, Bool_t getDCS = kTRUE, Bool_t getAlign = kTRUE);
  // read AliTRDCalPad objects from a root file and dump a root tree
  void DumpCalibToTree(const Char_t* inFilename, const Char_t* outFilename);
  // extract averages from calibration objects
  void ProcessTRDCalibArray(AliTRDCalDet* chamberCalib, AliTRDCalPad *padCalib,
			    TString parName, 
			    Double_t &runValue, Double_t &runRMS,
			    TVectorD &chamberValues, TVectorD &chamberValuesRMS,
			    TVectorD &superModuleValues, TVectorD &superModuleValuesRMS);
  // extract averages from calibration objects
  void ProcessTRDCalibArray(AliTRDCalPad *padCalib,
                            TVectorD &superModuleValues, TVectorD &superModuleValuesRMS);

  virtual const char* AddAbbreviations(char* c, Bool_t printDrawCommand = kFALSE);
  void GetLayerSectorStack(TString trdString, Int_t& layerNo, Int_t& sectorNo, Int_t& stackNo) const;
  // easy drawing of data, use '~' for abbreviation of '.fElements'
  virtual Int_t EasyDraw(const char* drawCommand, const char* sector, const char* cuts = 0, 
			 const char* drawOptions = 0, Bool_t writeDrawCommand = kFALSE) const;   
  // easy drawing of data, use '~' for abbreviation of '.fElements'
  virtual Int_t EasyDraw(const char* drawCommand, Int_t sector, const char* cuts = 0, 
			 const char* drawOptions = 0, Bool_t writeDrawCommand = kFALSE) const;   
  // easy drawing of data, use '~' for abbreviation of '.fElements'
  virtual Int_t EasyDraw1D(const char* drawCommand, const char* sector, const char* cuts = 0, 
			   const char* drawOptions = 0, Bool_t writeDrawCommand = kFALSE) const;   
  // easy drawing of data, use '~' for abbreviation of '.fElements'
  virtual Int_t EasyDraw1D(const char* drawCommand, Int_t sector, const char* cuts = 0, 
			   const char* drawOptions = 0, Bool_t writeDrawCommand = kFALSE) const;  

  ClassDef(AliTRDCalibViewer,1)    //  TRD calibration viewer class
};

#endif
 AliTRDCalibViewer.h:1
 AliTRDCalibViewer.h:2
 AliTRDCalibViewer.h:3
 AliTRDCalibViewer.h:4
 AliTRDCalibViewer.h:5
 AliTRDCalibViewer.h:6
 AliTRDCalibViewer.h:7
 AliTRDCalibViewer.h:8
 AliTRDCalibViewer.h:9
 AliTRDCalibViewer.h:10
 AliTRDCalibViewer.h:11
 AliTRDCalibViewer.h:12
 AliTRDCalibViewer.h:13
 AliTRDCalibViewer.h:14
 AliTRDCalibViewer.h:15
 AliTRDCalibViewer.h:16
 AliTRDCalibViewer.h:17
 AliTRDCalibViewer.h:18
 AliTRDCalibViewer.h:19
 AliTRDCalibViewer.h:20
 AliTRDCalibViewer.h:21
 AliTRDCalibViewer.h:22
 AliTRDCalibViewer.h:23
 AliTRDCalibViewer.h:24
 AliTRDCalibViewer.h:25
 AliTRDCalibViewer.h:26
 AliTRDCalibViewer.h:27
 AliTRDCalibViewer.h:28
 AliTRDCalibViewer.h:29
 AliTRDCalibViewer.h:30
 AliTRDCalibViewer.h:31
 AliTRDCalibViewer.h:32
 AliTRDCalibViewer.h:33
 AliTRDCalibViewer.h:34
 AliTRDCalibViewer.h:35
 AliTRDCalibViewer.h:36
 AliTRDCalibViewer.h:37
 AliTRDCalibViewer.h:38
 AliTRDCalibViewer.h:39
 AliTRDCalibViewer.h:40
 AliTRDCalibViewer.h:41
 AliTRDCalibViewer.h:42
 AliTRDCalibViewer.h:43
 AliTRDCalibViewer.h:44
 AliTRDCalibViewer.h:45
 AliTRDCalibViewer.h:46
 AliTRDCalibViewer.h:47
 AliTRDCalibViewer.h:48
 AliTRDCalibViewer.h:49
 AliTRDCalibViewer.h:50
 AliTRDCalibViewer.h:51
 AliTRDCalibViewer.h:52
 AliTRDCalibViewer.h:53
 AliTRDCalibViewer.h:54
 AliTRDCalibViewer.h:55
 AliTRDCalibViewer.h:56
 AliTRDCalibViewer.h:57
 AliTRDCalibViewer.h:58
 AliTRDCalibViewer.h:59
 AliTRDCalibViewer.h:60
 AliTRDCalibViewer.h:61
 AliTRDCalibViewer.h:62
 AliTRDCalibViewer.h:63
 AliTRDCalibViewer.h:64
 AliTRDCalibViewer.h:65
 AliTRDCalibViewer.h:66
 AliTRDCalibViewer.h:67
 AliTRDCalibViewer.h:68
 AliTRDCalibViewer.h:69
 AliTRDCalibViewer.h:70
 AliTRDCalibViewer.h:71
 AliTRDCalibViewer.h:72
 AliTRDCalibViewer.h:73
 AliTRDCalibViewer.h:74
 AliTRDCalibViewer.h:75