/*
$Log$
+Revision 1.3 2007/10/12 13:36:27 cvetan
+Coding convention fixes from Stefan
+
Revision 1.2 2007/09/18 09:44:45 cvetan
Sorting out some issues concerning the compilation with and without DATE support
*/
////////////////////////////////////////////////////////////////////////
-//
-// AliTPCMonitor class
-//
-// Main class for TPC Monitor
-// Monitor can handle rootified data, files and online streams in DATE format.
-// The monitor GUI is started by the macro TPCMonitor.C
-//
-// In the The data are read in in two read cycles.
-// If no sector is specified (sectorid==-1) all sectors are read and only the max value
-// for each channel is stored in a global histogram for Side A and C.
-// In this way the whole TPC can be read in at once.
-//
-// If the sector is specified only one sector is read in and additional quantities
-// e.g baseline and baseline rms are calculated and stored.
-//
-// Author: Stefan Kniege, IKF, Frankfurt
-//
-//
+////
+//// AliTPCMonitor class
+////
+//// Main class for TPC Monitor
+//// Monitor can handle rootified data, files and online streams in DATE format.
+//// The monitor GUI is started by the macro TPCMonitor.C
+////
+//// In the The data are read in in two read cycles.
+//// If no sector is specified (sectorid==-1) all sectors are read and only the max value
+//// for each channel is stored in a global histogram for Side A and C.
+//// In this way the whole TPC can be read in at once.
+////
+//// If the sector is specified only one sector is read in and additional quantities
+//// e.g baseline and baseline rms are calculated and stored.
+////
+//// Author: Stefan Kniege, IKF, Frankfurt
+////
+////
/////////////////////////////////////////////////////////////////////////
Float_t rowtimezmin = 0;
Float_t rowtimezmax = 0;
- Int_t prof_rowxmin = 0;
- Int_t prof_rowxmax = 0;
- Double_t prof_rowymin = 0;
- Double_t prof_rowymax = 0;
+ Int_t profrowxmin = 0;
+ Int_t profrowxmax = 0;
+ Double_t profrowymin = 0;
+ Double_t profrowymax = 0;
Int_t profxxmin = 0;
Int_t profxxmax = 0;
rowtimezmin = ((TH2F*)gROOT->Get(rowhist))->GetMinimum();
rowtimezmax = ((TH2F*)gROOT->Get(rowhist))->GetMaximum();
- prof_rowxmin = ((TH1F*)gROOT->Get(rowhistmax))->GetXaxis()->GetFirst();
- prof_rowxmax = ((TH1F*)gROOT->Get(rowhistmax))->GetXaxis()->GetLast();
- prof_rowymin = ((TH1F*)gROOT->Get(rowhistmax))->GetMinimum();
- prof_rowymax = ((TH1F*)gROOT->Get(rowhistmax))->GetMaximum();
+ profrowxmin = ((TH1F*)gROOT->Get(rowhistmax))->GetXaxis()->GetFirst();
+ profrowxmax = ((TH1F*)gROOT->Get(rowhistmax))->GetXaxis()->GetLast();
+ profrowymin = ((TH1F*)gROOT->Get(rowhistmax))->GetMinimum();
+ profrowymax = ((TH1F*)gROOT->Get(rowhistmax))->GetMaximum();
profxxmin = ((TH1F*)gROOT->Get(rowhistxmax))->GetXaxis()->GetFirst();
profxxmax = ((TH1F*)gROOT->Get(rowhistxmax))->GetXaxis()->GetLast();
// max and sum /////////////////////////
crowmax->cd();
if(setrange) {
- hrowmax->GetXaxis()->SetRange(prof_rowxmin,prof_rowxmax);
- hrowmax->SetMinimum(prof_rowymin);
- hrowmax->SetMaximum(prof_rowymax);
+ hrowmax->GetXaxis()->SetRange(profrowxmin,profrowxmax);
+ hrowmax->SetMinimum(profrowymin);
+ hrowmax->SetMaximum(profrowymax);
}
hrowmax->SetTitleSize(0.04);
hrowmax->SetTitle(title);
Int_t connector = 0;
Int_t fecnr = 0;
- Int_t altrochip = 0;
+ Int_t altrochip = 0;
Int_t feclocbran = 0;
Int_t branch = 0;
Short_t rcuget = 0;
}
//__________________________________________________________________
-Int_t AliTPCMonitor::GetRCUPatch(Int_t runid, Int_t eqid)
+Int_t AliTPCMonitor::GetRCUPatch(Int_t runid, Int_t eqid) const
{
// Return RCU patch index for given equipment id eqid
////////////////////////////////////////////////////////////////////////
-//
-// AliTPCMonitor class
-//
-// Main class for the TPC raw data Monitor.
-// The Monitor can handle rootified data, files and online streams in DATE format.
-// The monitor GUI is started by the macro TPCMonitor.C
-//
-// Author: Stefan Kniege, IKF, Frankfurt
-//
-//
+////
+//// AliTPCMonitor class
+////
+//// Main class for the TPC raw data Monitor.
+//// The Monitor can handle rootified data, files and online streams in DATE format.
+//// The monitor GUI is started by the macro TPCMonitor.C
+////
+//// Author: Stefan Kniege, IKF, Frankfurt
+////
+////
/////////////////////////////////////////////////////////////////////////
#include "AliTPCMonitorConfig.h"
void ExecTransform();
void FillGlobal(Int_t sector);
- void FillHistsDecode( AliTPCMonitorAltro* altro , Int_t rcu_patch, Int_t id=0);
+ void FillHistsDecode( AliTPCMonitorAltro* altro , Int_t rcupatch, Int_t secid=0);
void FillHistsPadPlane();
static double Gamma4(double* x, double* par);
Int_t GetChannelsProc() const { return fChannelIter ;}
Int_t GetEventID() const { return fEventNumber ;}
TH1* GetHisto(char* histname);
- Int_t GetRCUPatch(Int_t runid, Int_t eqid);
+ Int_t GetRCUPatch(Int_t runid, Int_t eqid) const;
Int_t GetPadAtX(Float_t xval, Int_t row, Int_t padmax) const ;
Int_t GetPadAtX(Float_t xval, Int_t row) const ;
void SetMirror(Int_t val) { fMirror=val;}
void SetVerbose(Int_t val) { fVerb = val;}
void SetMappingHandler(AliTPCMonitorMappingHandler* val ) { fMapHand = val;}
- void ShowSel(Int_t* comp_val);
+ void ShowSel(Int_t* compval);
void SetEqIds();
void ResizeCanv();
/*
$Log$
+Revision 1.2 2007/10/12 13:36:27 cvetan
+Coding convention fixes from Stefan
+
Revision 1.1 2007/09/17 10:23:31 cvetan
New TPC monitoring package from Stefan Kniege. The monitoring package can be started by running TPCMonitor.C macro located in macros folder.
#include "AliTPCMonitorAltro.h"
#include "AliLog.h"
#include <Riostream.h>
-
+using namespace std;
ClassImp(AliTPCMonitorAltro)
//_____________________________________________________________________________________________
// Create array for 10 bit decoded data
fallocate10BitArray = true;
f10BitArray = new Short_t[Get10BitArraySize()];
-}
+}
//_____________________________________________________________________________________________
long long *AliTPCMonitorAltro::Get40BitArray()
return f10BitArray;
}
-//_____________________________________________________________________________________________
-Int_t AliTPCMonitorAltro::Get40BitArraySize()
-{
- // Return number of 40 bit words in payload
- return fmemory[fsize-1];
-}
+// //_____________________________________________________________________________________________
+// Int_t AliTPCMonitorAltro::Get40BitArraySize()
+// {
+// // Return number of 40 bit words in payload
+// return fmemory[fsize-1];
+// }
-//_____________________________________________________________________________________________
-Int_t AliTPCMonitorAltro::Get10BitArraySize()
-{
- // Return number of 10 bit words in payload
- return fmemory[fsize-1]*4;
-}
+// //_____________________________________________________________________________________________
+// Int_t AliTPCMonitorAltro::Get10BitArraySize()
+// {
+// // Return number of 10 bit words in payload
+// return fmemory[fsize-1]*4;
+// }
//_____________________________________________________________________________________________
void AliTPCMonitorAltro::Decodeto40Bit()
Int_t DecodeTrailer(Int_t pos);
Long64_t* Get40BitArray();
- Short_t *Get10BitArray();
- Int_t Get40BitArraySize();
- Int_t Get10BitArraySize();
+ Short_t *Get10BitArray();
+ Int_t Get40BitArraySize() const { return fmemory[fsize-1];}
+ Int_t Get10BitArraySize() const { return fmemory[fsize-1]*4;}
Char_t* GetActFileName() const { return ffilename;}
static Int_t GetHwMaskFEC() { return fgkHwMaskFEC;}
/*
$Log$
+Revision 1.2 2007/10/12 13:36:27 cvetan
+Coding convention fixes from Stefan
+
Revision 1.1 2007/09/17 10:23:31 cvetan
New TPC monitoring package from Stefan Kniege. The monitoring package can be started by running TPCMonitor.C macro located in macros folder.
*/
-////////////////////////////////////////////////////////////////////////
-//
-// AliTPCMonitorConfig class
-//
-// Configuration handler class for AliTPCMonitor
-//
-// The basic configuration will be read from the file AliTPCMonitorConfig.txt
-// and can be changed online via the Button "Conf. Ranges"
-// Basic configuration settings are e.g. the range for the determination
-// of the baseline, maximum adc value and the settings for the pedestal calculation.
-//
-// Author: Stefan Kniege, IKF, Frankfurt
-//
-//
+//////////////////////////////////////////////////////////////////////////
+////
+//// AliTPCMonitorConfig class
+////
+//// Configuration handler class for AliTPCMonitor
+////
+//// The basic configuration will be read from the file AliTPCMonitorConfig.txt
+//// and can be changed online via the Button "Conf. Ranges"
+//// Basic configuration settings are e.g. the range for the determination
+//// of the baseline, maximum adc value and the settings for the pedestal calculation.
+////
+//// Author: Stefan Kniege, IKF, Frankfurt
+////
+////
/////////////////////////////////////////////////////////////////////////
fTimeBins(1024),
fMaxHwAddr(24000),
fFitPulse(1),
- fProcOneSector(1)
+ fProcOneSector(0)
{
// Constructor
for(Int_t i =0; i<36; i++) { fSectorArr[i] = 0;}
/* $Id$ */
-////////////////////////////////////////////////////////////////////////
-//
-// AliTPCMonitorConfig class
-//
-// Configuration handler class for AliTPCMonitor
-//
-// Author: Stefan Kniege, IKF, Frankfurt
-//
-//
+//////////////////////////////////////////////////////////////////////////
+////
+//// AliTPCMonitorConfig class
+////
+//// Configuration handler class for AliTPCMonitor.
+//// The class reads and stores basic configurations
+//// for the AliTPCMonitor class. The values can be changed
+//// online or written to the configuration file AliTPCMonitorConfig.txt
+////
+//// Author: Stefan Kniege, IKF, Frankfurt
+////
+////
/////////////////////////////////////////////////////////////////////////
#include "TNamed.h"
/*
$Log$
+Revision 1.2 2007/10/12 13:36:27 cvetan
+Coding convention fixes from Stefan
+
Revision 1.1 2007/09/17 10:23:31 cvetan
New TPC monitoring package from Stefan Kniege. The monitoring package can be started by running TPCMonitor.C macro located in macros folder.
*/
////////////////////////////////////////////////////////////////////////
-//
-// AliTPCMonitorDateFile class
-//
-// Class for handling the data structure in a DATE file
-// Used to read DATE files for the TPC raw data Monitor
-//
-// Author: Roland Bramm
-// Stefan Kniege, IKF, Frankfurt
-//
-//
+////
+//// AliTPCMonitorDateFile class
+////
+//// Class for handling the data structure in a DATE file
+//// Used to read DATE files for the TPC raw data Monitor
+////
+//// Author: Roland Bramm
+//// Stefan Kniege, IKF, Frankfurt
+////
+////
/////////////////////////////////////////////////////////////////////////
}
//____________________________________________________________________________
-Int_t AliTPCMonitorDateFile::GetFileSize()
+Int_t AliTPCMonitorDateFile::GetFileSize() const
{
// Return size of DATE file
return ffileSize;
fin->read((Char_t*)fmem,sfmem);
fin->seekg(ffilePos);
- AliTPCMonitorDateFormat *DateForm;
- DateForm = new AliTPCMonitorDateFormat((Char_t *)&fmem);
+ AliTPCMonitorDateFormat *dateform;
+ dateform = new AliTPCMonitorDateFormat((Char_t *)&fmem);
- toSwapEndian = DateForm->IsEventWrongEndian();
+ toSwapEndian = dateform->IsEventWrongEndian();
if(toSwapEndian == true){
- delete DateForm;
+ delete dateform;
for(Int_t i = 0; i < 68; i++) {
swapcarry[0] = fmem[(i*4)+0];
swapcarry[1] = fmem[(i*4)+1];
fmem[(i*4)+2] = swapcarry[1];
fmem[(i*4)+3] = swapcarry[0];
}
- DateForm = new AliTPCMonitorDateFormat((Char_t *)&fmem);
+ dateform = new AliTPCMonitorDateFormat((Char_t *)&fmem);
}
- size = DateForm->GetEventSize();
+ size = dateform->GetEventSize();
if(size > GetAllocatedSizeofArray()) {
AllocateArray((Int_t)(size*1.1));
}
}else{
freadPosOverflow = true;
}
- delete DateForm;
+ delete dateform;
}else{
freadPosOverflow = true;
}
}
//____________________________________________________________________________
-Bool_t AliTPCMonitorDateFile::IsLastEvent()
+Bool_t AliTPCMonitorDateFile::IsLastEvent() const
{
// Check if event is last event in file
Bool_t retval;
}
//____________________________________________________________________________
-Bool_t AliTPCMonitorDateFile::IsEventValid()
+Bool_t AliTPCMonitorDateFile::IsEventValid() const
{
// Check Over flow flag
Bool_t retval;
}
//____________________________________________________________________________
-Int_t AliTPCMonitorDateFile::GetFilePosition()
+Int_t AliTPCMonitorDateFile::GetFilePosition() const
{
// Return current position in file
return ffilePos;
}
//____________________________________________________________________________
-Int_t AliTPCMonitorDateFile::GetAllocatedSizeofArray()
+Int_t AliTPCMonitorDateFile::GetAllocatedSizeofArray() const
{
// Return size of allocated data array
return fbigMemsize;
////////////////////////////////////////////////////////////////////////
-//
-// AliTPCMonitorDateFile class
-//
-// Class for handling the data structure in a DATE file
-//
-// Authors: Roland Bramm
-// Stefan Kniege, IKF, Frankfurt
-//
-//
+////
+//// AliTPCMonitorDateFile class
+////
+//// Class for handling the data structure in a DATE file
+////
+//// Authors: Roland Bramm
+//// Stefan Kniege, IKF, Frankfurt
+////
+////
/////////////////////////////////////////////////////////////////////////
using namespace std;
class AliTPCMonitorDateFile : public TNamed {
- public:
+ public:
AliTPCMonitorDateFile();
AliTPCMonitorDateFile(const AliTPCMonitorDateFile &datefile);
AliTPCMonitorDateFile& operator= (const AliTPCMonitorDateFile& datefile);
void AllocateArray(int size);
void CloseDateFile();
- Int_t GetAllocatedSizeofArray();
- Int_t GetFileSize();
- Int_t GetFilePosition();
+ Int_t GetAllocatedSizeofArray() const;
+ Int_t GetFileSize() const;
+ Int_t GetFilePosition() const;
Char_t* GetMemoryPointer();
- Bool_t IsLastEvent();
- Bool_t IsEventValid();
+ Bool_t IsLastEvent() const;
+ Bool_t IsEventValid() const;
Bool_t IsDateFileOpen();
void OpenDateFile(string name);
* provided "as is" without express or implied warranty. *
**************************************************************************/
-/*
+/*
$Log$
+Revision 1.3 2007/10/12 13:36:27 cvetan
+Coding convention fixes from Stefan
+
Revision 1.2 2007/09/17 16:34:54 cvetan
The package was overwriting the rootcint flags. This was fixed by applying the necessary changes in the DATE-dependent parts of the code
////////////////////////////////////////////////////////////////////////
-//
-// AliTPCMonitorDateFormat class
-//
-// Class for decoding raw data headers in DATE format
-// Reads event and subevent header informations form DATE files
-//
-// Authors: Roland Bramm,
-// Stefan Kniege, IKF, Frankfurt
-//
+////
+//// AliTPCMonitorDateFormat class
+////
+//// Class for decoding raw data headers in DATE format
+////
+//// Reads event and subevent header informations form DATE files
+////
+//// Authors: Roland Bramm,
+//// Stefan Kniege, IKF, Frankfurt
+////
/////////////////////////////////////////////////////////////////////////
#include "AliTPCMonitorDateFormat.h"
fdataPtr(data),
fsubEventPtr(data),
fcurrentPtr(data),
- event((struct eventHeaderStruct*) fdataPtr),
- subEvent(0),
- equipment(0)
+ fevent((struct eventHeaderStruct*) fdataPtr),
+ fsubEvent(0),
+ fequipment(0)
{
// Constructor
}
fdataPtr(dateformat.fdataPtr),
fsubEventPtr(dateformat.fsubEventPtr),
fcurrentPtr(dateformat.fcurrentPtr),
- event((struct eventHeaderStruct*)dateformat.fdataPtr),
- subEvent(dateformat.subEvent),
- equipment(dateformat.equipment)
+ fevent((struct eventHeaderStruct*)dateformat.fdataPtr),
+ fsubEvent(dateformat.fsubEvent),
+ fequipment(dateformat.fequipment)
{
// copy constructor
}
fdataPtr=dateformat.fdataPtr;
fsubEventPtr=dateformat.fsubEventPtr;
fcurrentPtr=dateformat.fcurrentPtr;
- event=dateformat.event;
- subEvent=dateformat.subEvent;
- equipment=dateformat.equipment;
+ fevent=dateformat.fevent;
+ fsubEvent=dateformat.fsubEvent;
+ fequipment=dateformat.fequipment;
}
return *this;
}
}
//____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetEventSize()
+Int_t AliTPCMonitorDateFormat::GetEventSize()const
{
// Return event size
- return (Int_t)event->eventSize;
+ return (Int_t)fevent->eventSize;
}
//____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetEventHeaderSize()
+Int_t AliTPCMonitorDateFormat::GetEventHeaderSize()const
{
// Return event header size
- return (Int_t)event->eventHeadSize;
+ return (Int_t)fevent->eventHeadSize;
}
//____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetEventHeaderBaseSize()
+Int_t AliTPCMonitorDateFormat::GetEventHeaderBaseSize()const
{
// Return event header base size
return (Int_t)EVENT_HEAD_BASE_SIZE;
}
//____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetEventID()
+Int_t AliTPCMonitorDateFormat::GetEventID()const
{
// Return event ID
- return (Int_t)EVENT_ID_GET_NB_IN_RUN(event->eventId);
+ return (Int_t)EVENT_ID_GET_NB_IN_RUN(fevent->eventId);
}
//____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetEventLDC()
+Int_t AliTPCMonitorDateFormat::GetEventLDC()const
{
// Return event LDC
- return (Int_t)event->eventLdcId;
+ return (Int_t)fevent->eventLdcId;
}
//____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetEventGDC()
+Int_t AliTPCMonitorDateFormat::GetEventGDC()const
{
// return event GDC
- return (Int_t)event->eventGdcId;
+ return (Int_t)fevent->eventGdcId;
}
//____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetEventRunID()
+Int_t AliTPCMonitorDateFormat::GetEventRunID()const
{
// Return run ID
- return (Int_t)event->eventRunNb;
+ return (Int_t)fevent->eventRunNb;
}
//____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetEventVersion()
+Int_t AliTPCMonitorDateFormat::GetEventVersion()const
{
// Return event version
- return (Int_t)event->eventVersion;
+ return (Int_t)fevent->eventVersion;
}
//____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetEventVersionMajor()
+Int_t AliTPCMonitorDateFormat::GetEventVersionMajor()const
{
// retrun event version (16-32 bit)
return (Int_t)(GetEventVersion()>>16);
}
//____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetEventVersionMinor()
+Int_t AliTPCMonitorDateFormat::GetEventVersionMinor()const
{
// return event version (0-15 bit)
return (Int_t)(GetEventVersion()&0x0000ffff);
}
//____________________________________________________________________________
-Bool_t AliTPCMonitorDateFormat::IsEventSuperEvent()
+Bool_t AliTPCMonitorDateFormat::IsEventSuperEvent()const
{
// Check if event ist super event
Bool_t retval;
- if(TEST_SYSTEM_ATTRIBUTE( event->eventTypeAttribute, ATTR_SUPER_EVENT ) == 1)
+ if(TEST_SYSTEM_ATTRIBUTE( fevent->eventTypeAttribute, ATTR_SUPER_EVENT ) == 1)
retval = true;
else
retval = false;
}
//____________________________________________________________________________
-Bool_t AliTPCMonitorDateFormat::IsEventStartOfRun()
+Bool_t AliTPCMonitorDateFormat::IsEventStartOfRun()const
{
// Check if event ist Start of Run
Bool_t retval;
- if(event->eventType == START_OF_RUN)
+ if(fevent->eventType == START_OF_RUN)
retval = true;
else
retval = false;
}
//____________________________________________________________________________
-Bool_t AliTPCMonitorDateFormat::IsEventEndOfRun()
+Bool_t AliTPCMonitorDateFormat::IsEventEndOfRun()const
{
// Check if event is End of Run
Bool_t retval;
- if(event->eventType == END_OF_RUN)
+ if(fevent->eventType == END_OF_RUN)
retval = true;
else
retval = false;
}
//____________________________________________________________________________
-Bool_t AliTPCMonitorDateFormat::IsEventPhysicsEvent()
+Bool_t AliTPCMonitorDateFormat::IsEventPhysicsEvent()const
{
// Check if event is Physics event
Bool_t retval;
- if(event->eventType == PHYSICS_EVENT)
+ if(fevent->eventType == PHYSICS_EVENT)
retval = true;
else
retval = false;
}
//____________________________________________________________________________
-Bool_t AliTPCMonitorDateFormat::IsEventSwapped()
+Bool_t AliTPCMonitorDateFormat::IsEventSwapped()const
{
// Check if event is swapped
Bool_t retval;
- if(TEST_SYSTEM_ATTRIBUTE( event->eventTypeAttribute, ATTR_EVENT_SWAPPED ) == 1)
+ if(TEST_SYSTEM_ATTRIBUTE( fevent->eventTypeAttribute, ATTR_EVENT_SWAPPED ) == 1)
retval = true;
else
retval = false;
}
//____________________________________________________________________________
-Bool_t AliTPCMonitorDateFormat::IsEventWrongEndian()
+Bool_t AliTPCMonitorDateFormat::IsEventWrongEndian()const
{
// Check endian
Bool_t retval;
- if(EVENT_MAGIC_NUMBER == event->eventMagic)
+ if(EVENT_MAGIC_NUMBER == fevent->eventMagic)
retval = false;
else
retval = true;
// Set subevent Pointer to sub event
if(IsEventSuperEvent() ==true){
fsubEventPtr = fdataPtr+GetEventHeaderSize();
- subEvent = (struct eventHeaderStruct*) (fsubEventPtr);
+ fsubEvent = (struct eventHeaderStruct*) (fsubEventPtr);
}else{
fsubEventPtr = fdataPtr;
- subEvent = (struct eventHeaderStruct*) (fsubEventPtr);
+ fsubEvent = (struct eventHeaderStruct*) (fsubEventPtr);
}
}
{
// set subevent pointer to next sub event
fsubEventPtr += GetSubEventSize();
- subEvent = (struct eventHeaderStruct*) (fsubEventPtr);
+ fsubEvent = (struct eventHeaderStruct*) (fsubEventPtr);
}
//____________________________________________________________________________
-Bool_t AliTPCMonitorDateFormat::IsLastSubEventHeader()
+Bool_t AliTPCMonitorDateFormat::IsLastSubEventHeader()const
{
// Check if sub event is last sub event
Bool_t retval;
}
//____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetSubEventSize()
+Int_t AliTPCMonitorDateFormat::GetSubEventSize()const
{
// Return sub event size
- return (Int_t)subEvent->eventSize;
+ return (Int_t)fsubEvent->eventSize;
}
//____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetSubEventHeaderSize()
+Int_t AliTPCMonitorDateFormat::GetSubEventHeaderSize()const
{
// Return sub event header size
- return (Int_t)subEvent->eventHeadSize;
+ return (Int_t)fsubEvent->eventHeadSize;
}
//____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetSubEventLDC()
+Int_t AliTPCMonitorDateFormat::GetSubEventLDC()const
{
// Return sub event LDC
- return (Int_t)subEvent->eventLdcId;
+ return (Int_t)fsubEvent->eventLdcId;
}
//____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetSubEventGDC()
+Int_t AliTPCMonitorDateFormat::GetSubEventGDC()const
{
// return sub event GDC
- return (Int_t)subEvent->eventGdcId;
+ return (Int_t)fsubEvent->eventGdcId;
}
{
// Check if sub event is super event
Bool_t retval;
- if(TEST_SYSTEM_ATTRIBUTE( subEvent->eventTypeAttribute, ATTR_SUPER_EVENT ) == 1)
+ if(TEST_SYSTEM_ATTRIBUTE( fsubEvent->eventTypeAttribute, ATTR_SUPER_EVENT ) == 1)
retval = true;
else
retval = false;
}
//____________________________________________________________________________
-Bool_t AliTPCMonitorDateFormat::IsSubEventStartOfRun()
-{
+Bool_t AliTPCMonitorDateFormat::IsSubEventStartOfRun()const
+{
// Check if sub event is start of run
Bool_t retval;
- if(subEvent->eventType == START_OF_RUN)
+ if(fsubEvent->eventType == START_OF_RUN)
retval = true;
else
retval = false;
}
//____________________________________________________________________________
-Bool_t AliTPCMonitorDateFormat::IsSubEventEndOfRun()
+Bool_t AliTPCMonitorDateFormat::IsSubEventEndOfRun()const
{
// Check if sub event is end of run
Bool_t retval;
- if(subEvent->eventType == END_OF_RUN)
+ if(fsubEvent->eventType == END_OF_RUN)
retval = true;
else
retval = false;
}
//____________________________________________________________________________
-Bool_t AliTPCMonitorDateFormat::IsSubEventPhysicsEvent()
+Bool_t AliTPCMonitorDateFormat::IsSubEventPhysicsEvent()const
{
// Check if sub event is physics event
Bool_t retval;
- if(subEvent->eventType == PHYSICS_EVENT)
+ if(fsubEvent->eventType == PHYSICS_EVENT)
retval = true;
else
retval = false;
{
// Set current pointer to first equipment
fcurrentPtr = fsubEventPtr + GetSubEventHeaderSize();
- equipment = (struct equipmentHeaderStruct*) (fcurrentPtr);
+ fequipment = (struct equipmentHeaderStruct*) (fcurrentPtr);
}
//____________________________________________________________________________
{
// Set current pointer to next equipment
fcurrentPtr += GetEquipmentSize();
- equipment = (struct equipmentHeaderStruct*) (fcurrentPtr);
+ fequipment = (struct equipmentHeaderStruct*) (fcurrentPtr);
}
//____________________________________________________________________________
-Bool_t AliTPCMonitorDateFormat::IsLastEquipment()
+Bool_t AliTPCMonitorDateFormat::IsLastEquipment() const
{
// Check if equipment is last equipment
Bool_t retval;
- Int_t position;
+ Int_t position;
position = fcurrentPtr - fsubEventPtr;
if( (position+GetEquipmentSize()) < GetSubEventSize() )
retval = false;
}
//____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetEquipmentSize()
+Int_t AliTPCMonitorDateFormat::GetEquipmentSize() const
{
// Return equipment size
- return (Int_t)equipment->equipmentSize;
+ return (Int_t)fequipment->equipmentSize;
}
//____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetPayloadSize()
+Int_t AliTPCMonitorDateFormat::GetPayloadSize() const
{
// Return payload slze
Int_t retval = 0;
if(GetEventVersion() < 196610){
- retval = (Int_t)equipment->equipmentSize;
+ retval = (Int_t)fequipment->equipmentSize;
}else{
- retval = (Int_t)equipment->equipmentSize - GetEquipmentHeaderSize();
+ retval = (Int_t)fequipment->equipmentSize - GetEquipmentHeaderSize();
}
return retval;
}
//____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetEquipmentType()
+Int_t AliTPCMonitorDateFormat::GetEquipmentType() const
{
// Return equipment type
- return (Int_t)equipment->equipmentType;
+ return (Int_t)fequipment->equipmentType;
}
//____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetEquipmentID()
+Int_t AliTPCMonitorDateFormat::GetEquipmentID() const
{
// Return equipment ID
- return (Int_t)equipment->equipmentId;
+ return (Int_t)fequipment->equipmentId;
}
//____________________________________________________________________________
Int_t* AliTPCMonitorDateFormat::GetEquipmentTypeAttribute()
{
// Return equipment type attribute
- return (Int_t*)equipment->equipmentTypeAttribute;
+ return (Int_t*)fequipment->equipmentTypeAttribute;
}
//____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetEquipmentBasicSize()
+Int_t AliTPCMonitorDateFormat::GetEquipmentBasicSize() const
{
// Return equipment basic size
- return (Int_t)equipment->equipmentBasicElementSize;
+ return (Int_t)fequipment->equipmentBasicElementSize;
}
//____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetEquipmentHeaderSize()
+Int_t AliTPCMonitorDateFormat::GetEquipmentHeaderSize() const
{
// Return equipment header size
return sizeof(struct equipmentHeaderStruct);
//____________________________________________________________________________
-Char_t *AliTPCMonitorDateFormat::GetFirstDataPointer()
+Char_t *AliTPCMonitorDateFormat::GetFirstDataPointer()
{
// Return data pointer (after equipment header)
Char_t *datapointer;
}
//____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetPosition()
+Int_t AliTPCMonitorDateFormat::GetPosition() const
{
// Return current position relative to start of event
Int_t retval = (Int_t) (fcurrentPtr - fdataPtr);
}
//____________________________________________________________________________
-Int_t AliTPCMonitorDateFormat::GetPositionSubEvent()
+Int_t AliTPCMonitorDateFormat::GetPositionSubEvent() const
{
// Return subevent position relative to start of event
Int_t retval = (Int_t) (fsubEventPtr - fdataPtr);
////////////////////////////////////////////////////////////////////////
-//
-// AliTPCMonitorDateFormat class
-//
-// Class for decoding raw data headers in DATE format
-//
-// Authors: Roland Bramm,
-// Stefan Kniege, IKF, Frankfurt
-//
+////
+//// AliTPCMonitorDateFormat class
+////
+//// Class for decoding raw data headers in DATE format
+////
+//// Authors: Roland Bramm,
+//// Stefan Kniege, IKF, Frankfurt
+////
/////////////////////////////////////////////////////////////////////////
struct eventHeaderStruct;
public:
AliTPCMonitorDateFormat(Char_t* data);
AliTPCMonitorDateFormat(const AliTPCMonitorDateFormat &dateformat);
- AliTPCMonitorDateFormat& operator= (const AliTPCMonitorDateFormat& dateformat);
- ~AliTPCMonitorDateFormat();
+ AliTPCMonitorDateFormat& operator= (const AliTPCMonitorDateFormat& dateformat);
+ ~AliTPCMonitorDateFormat();
//Super Event Header
- Int_t GetEventSize();
- Int_t GetEventHeaderSize();
- Int_t GetEventHeaderBaseSize();
- Int_t GetEventID();
- Int_t GetEventLDC();
- Int_t GetEventGDC();
+ Int_t GetEventSize() const;
+ Int_t GetEventHeaderSize() const;
+ Int_t GetEventHeaderBaseSize() const;
+ Int_t GetEventID() const;
+ Int_t GetEventLDC() const;
+ Int_t GetEventGDC() const;
- Int_t GetEventRunID();
- Int_t GetEventVersion();
- Int_t GetEventVersionMajor();
- Int_t GetEventVersionMinor();
- Bool_t IsEventSuperEvent();
- Bool_t IsEventStartOfRun();
- Bool_t IsEventEndOfRun();
- Bool_t IsEventPhysicsEvent();
- Bool_t IsEventSwapped();
- Bool_t IsEventWrongEndian();
+ Int_t GetEventRunID() const;
+ Int_t GetEventVersion() const;
+ Int_t GetEventVersionMajor() const;
+ Int_t GetEventVersionMinor() const;
+ Bool_t IsEventSuperEvent() const;
+ Bool_t IsEventStartOfRun() const;
+ Bool_t IsEventEndOfRun() const;
+ Bool_t IsEventPhysicsEvent() const;
+ Bool_t IsEventSwapped() const;
+ Bool_t IsEventWrongEndian() const;
//Sub Event Header
void GotoSubEventHeader();
void GotoNextSubEventHeader();
- Bool_t IsLastSubEventHeader();
+ Bool_t IsLastSubEventHeader() const;
- Int_t GetSubEventSize();
- Int_t GetSubEventHeaderSize();
- Int_t GetSubEventLDC();
- Int_t GetSubEventGDC();
+ Int_t GetSubEventSize() const;
+ Int_t GetSubEventHeaderSize() const;
+ Int_t GetSubEventLDC() const;
+ Int_t GetSubEventGDC() const;
Bool_t IsSubEventSuperEvent();
- Bool_t IsSubEventStartOfRun();
- Bool_t IsSubEventEndOfRun();
- Bool_t IsSubEventPhysicsEvent();
+ Bool_t IsSubEventStartOfRun() const;
+ Bool_t IsSubEventEndOfRun() const;
+ Bool_t IsSubEventPhysicsEvent() const;
//Eqipments
void GotoFirstEquipment();
void GotoNextEquipment();
- Bool_t IsLastEquipment();
+ Bool_t IsLastEquipment() const;
- Int_t GetEquipmentSize();
- Int_t GetEquipmentType();
- Int_t GetEquipmentID();
+ Int_t GetEquipmentSize() const;
+ Int_t GetEquipmentType() const;
+ Int_t GetEquipmentID() const;
Int_t* GetEquipmentTypeAttribute();
- Int_t GetEquipmentBasicSize();
- Int_t GetEquipmentHeaderSize();
- Int_t GetPayloadSize();
+ Int_t GetEquipmentBasicSize() const;
+ Int_t GetEquipmentHeaderSize() const;
+ Int_t GetPayloadSize() const;
//DATA
Char_t* GetFirstDataPointer();
- Int_t GetPosition();
- Int_t GetPositionSubEvent();
+ Int_t GetPosition() const;
+ Int_t GetPositionSubEvent() const;
private:
Char_t* fdataPtr; // pointer to data array (start, will not be changed in event)
Char_t* fsubEventPtr; // pointer to SubEvent
Char_t* fcurrentPtr; // pointer to current data position (header or data)
- eventHeaderStruct* event; // event and
- eventHeaderStruct* subEvent; // subevent structure
- equipmentHeaderStruct* equipment; // equipmemnt structure
+ eventHeaderStruct* fevent; // event and
+ eventHeaderStruct* fsubEvent; // subevent structure
+ equipmentHeaderStruct* fequipment; // equipmemnt structure
ClassDef(AliTPCMonitorDateFormat,1);
};
////////////////////////////////////////////////////////////////////////
-//
-// AliTPCMonitorDateMonitor class
-//
-// Monitoring wrapper class for DATE monitoring
-//
-// Authors: Roland Bramm,
-// Stefan Kniege, IKF, Frankfurt
-//
+////
+//// AliTPCMonitorDateMonitor class
+////
+//// Monitoring wrapper class for DATE monitoring
+////
+//// Authors: Roland Bramm,
+//// Stefan Kniege, IKF, Frankfurt
+////
/////////////////////////////////////////////////////////////////////////
#include <string>
*/
////////////////////////////////////////////////////////////////////////
-//
-// AliTPCMonitorDialog class
-//
-// Class to handle dialogs for settings of files and configurations
-// for the AliTPCMonitor
-//
-// The dialog will be called by an AliTPCMonitor object from the macro TPCMonitor.C.
-// Depending on the version number passed when creating an Object of this class
-// a certain dialog window (see constructor) for the TPCMonitor will be opened.
-// The data inserted will be passed to the configuration handler and read out
-// by the monitor object or a the monitor member function will be directly called.
-//
-// Author: Stefan Kniege, IKF, Frankfurt
-//
-//
+////
+//// AliTPCMonitorDialog class
+////
+//// Class to handle dialogs for settings of files and configurations
+//// for the AliTPCMonitor
+////
+//// The dialog will be called by an AliTPCMonitor object from the macro TPCMonitor.C.
+//// Depending on the version number passed when creating an Object of this class
+//// a certain dialog window (see constructor) for the TPCMonitor will be opened.
+//// The data inserted will be passed to the configuration handler and read out
+//// by the monitor object or a the monitor member function will be directly called.
+////
+//// Author: Stefan Kniege, IKF, Frankfurt
+////
+////
/////////////////////////////////////////////////////////////////////////
#include "TGWindow.h"
#include "TVirtualPadEditor.h"
#include "TTimer.h"
-#include "RQ_OBJECT.h"
#include <Riostream.h>
#include "Rtypes.h"
#include "AliLog.h"
ClassImp(AliTPCMonitorDialog)
//_____________________________________________________________________________________________
-AliTPCMonitorDialog::AliTPCMonitorDialog(const TGWindow *p, const TGWindow *main, UInt_t w,
- UInt_t h, UInt_t options, Int_t version,AliTPCMonitor* monitor):
+AliTPCMonitorDialog::AliTPCMonitorDialog(TGWindow *p, TGWindow *main, UInt_t w,
+ UInt_t h, UInt_t options, Int_t version,AliTPCMonitor* monitor):
+ //fQObject(0),
fFrameMain(new TGTransientFrame(p, main, w, h, options)),
fFrameComp(0),
fFrameHor(new TGHorizontalFrame(fFrameMain, 60, 20, kFixedWidth)),
fLayout1(new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 2, 2, 2, 2)),
fLayout2(new TGLayoutHints(kLHintsBottom | kLHintsRight , 2, 2, 5, 1)),
fLayout3(new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 5)),
- fMonitor(monitor)
-
+ fMonitor(monitor),
+ fWidth(w),
+ fHeight(h),
+ fOptions(options),
+ fVersion(version),
+ fClient(p),
+ fMain(main)
{
// Constructor for Dialog window.
// Create a dialog window.depending on the version it is called with..
CreateDialogVersion(version);
}
-// //_____________________________________________________________________________
-// AliTPCMonitorDialog::AliTPCMonitorDialog(const AliTPCMonitorDialog &dialog) :
-// {
-// // copy constructor (actually none forseen for this class
-// AliWarning("No copying forseen for this class");
-
-// }
+//_____________________________________________________________________________
+AliTPCMonitorDialog::AliTPCMonitorDialog(const AliTPCMonitorDialog &dialog) :
+TNamed(dialog.GetName(),dialog.GetTitle()),
+//fQObject(0),
+fFrameMain(new TGTransientFrame(dialog.GetClient(), dialog.GetMainFrame(), dialog.GetWidth(), dialog.GetHeight())),
+fFrameComp(0),
+fFrameHor(new TGHorizontalFrame(fFrameMain, 60, 20, kFixedWidth)),
+fFrameGroup(0),
+fOkButton(new TGTextButton(fFrameHor, "&Ok", 1)),
+fListBox(0),
+fTab(new TGTab(fFrameMain, 300, 300)),
+fLayout1(new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 2, 2, 2, 2)),
+fLayout2(new TGLayoutHints(kLHintsBottom | kLHintsRight , 2, 2, 5, 1)),
+fLayout3(new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 5)),
+fMonitor(dialog.GetMonitor()),
+fWidth(dialog.GetWidth()),
+fHeight(dialog.GetHeight()),
+fOptions(dialog.GetOptions()),
+fVersion(dialog.GetVersion()),
+fClient(dialog.GetClient()),
+fMain(dialog.GetMainFrame())
+{
+ // copy constructor (actually none forseen for this class)
+ fFrameMain->Connect("CloseWindow()", "AliTPCMonitorDialog", this, "DoClose()");
+ fFrameMain->DontCallClose();
+ fFrameMain->SetCleanup(kDeepCleanup);
+ fOkButton->Connect("Clicked()", "AliTPCMonitorDialog", this, "DoOK()");
+ fFrameHor->AddFrame(fOkButton, fLayout1);
+ fFrameHor->Resize(150, fOkButton->GetDefaultHeight());
+ fFrameMain->AddFrame( fFrameHor, fLayout2);
+ fTab->Connect("Selected(Int_t)", "AliTPCMonitorDialog", this, "DoTab(Int_t)");
+ CreateDialogVersion(dialog.GetVersion());
+
+}
-// //_____________________________________________________________________________
-// AliTPCMonitorDialog &AliTPCMonitorDialog::operator =(const AliTPCMonitorDialog& dialog)
-// {
-// // assignement operator
-// AliWarning("No assignment forseen for this class");
-// return *this;
-// }
+ //_____________________________________________________________________________
+AliTPCMonitorDialog &AliTPCMonitorDialog::operator =(const AliTPCMonitorDialog& dialog)
+{
+ // assignement operator (actually none forseen for this class)
+ if(this!=&dialog)
+ {
+ fFrameMain = new TGTransientFrame(dialog.GetClient(), dialog.GetMainFrame(), dialog.GetWidth(), dialog.GetHeight());
+ fFrameComp = 0;
+ fFrameHor = new TGHorizontalFrame(fFrameMain, 60, 20, kFixedWidth);
+ fFrameGroup = 0;
+ fOkButton = new TGTextButton(fFrameHor, "&Ok", 1);
+ fListBox = 0;
+ fTab = new TGTab(fFrameMain, 300, 300);
+ fLayout1 = new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 2, 2, 2, 2);
+ fLayout2 = new TGLayoutHints(kLHintsBottom | kLHintsRight , 2, 2, 5, 1);
+ fLayout3 = new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 5);
+ fMonitor = dialog.GetMonitor();
+ fWidth = dialog.GetWidth();
+ fHeight = dialog.GetHeight();
+ fOptions = dialog.GetOptions();
+ fClient = dialog.GetClient();
+ fVersion = dialog.GetVersion();
+ fMain = dialog.GetMainFrame();
+ fFrameMain->Connect("CloseWindow()", "AliTPCMonitorDialog", this, "DoClose()");
+ fFrameMain->DontCallClose();
+ fFrameMain->SetCleanup(kDeepCleanup);
+ fOkButton->Connect("Clicked()", "AliTPCMonitorDialog", this, "DoOK()");
+ fFrameHor->AddFrame(fOkButton, fLayout1);
+ fFrameHor->Resize(150, fOkButton->GetDefaultHeight());
+ fFrameMain->AddFrame( fFrameHor, fLayout2);
+ fTab->Connect("Selected(Int_t)", "AliTPCMonitorDialog", this, "DoTab(Int_t)");
+ CreateDialogVersion(dialog.GetVersion());
+ }
+ return *this;
+ }
case 2:
{
// Select FEE Component
- Int_t comp_sel=1;
+ Int_t compsel=1;
Int_t fComponents[10];
for(Int_t j = 0; j < 6; j++)
{
j==4 && (fComponents[j] < -1 || fComponents[j]>6 ) ||
j==5 && (fComponents[j] < -1 || fComponents[j]>8 ) )
{
- comp_sel =0;
+ compsel =0;
AliError("Settings out of range ( version 2) ");
}
}
- if(comp_sel==1)
+ if(compsel==1)
{
if(fMonitor!=0 && fMonitor->GetEventProcessed() )fMonitor->ShowSel((Int_t*)fComponents);
else AliError("No event processed up to now");
Int_t error = 1;
if(s1.find(",")!=string::npos){
- string sub1_1 = s1.substr(0,s1.find(",")) ;fConfigArr[0] = atoi(sub1_1.data());
- string sub1_2 = s1.substr(s1.find(",")+1,s1.length() ) ;fConfigArr[1] = atoi(sub1_2.data());
+ string sub11 = s1.substr(0,s1.find(",")) ;fConfigArr[0] = atoi(sub11.data());
+ string sub12 = s1.substr(s1.find(",")+1,s1.length() ) ;fConfigArr[1] = atoi(sub12.data());
if(fConfigArr[0]<fConfigArr[1] && fConfigArr[1]<1024){
fMonitor->SetRangeBase(fConfigArr[0],fConfigArr[1]);
error=0;
}
}
if(s2.find(",")!=string::npos){
- string sub2_1 = s2.substr(0,s2.find(",")) ;fConfigArr[2] = atoi(sub2_1.data());
- string sub2_2 = s2.substr(s2.find(",")+1,s2.length() ) ;fConfigArr[3] = atoi(sub2_2.data());
+ string sub21 = s2.substr(0,s2.find(",")) ;fConfigArr[2] = atoi(sub21.data());
+ string sub22 = s2.substr(s2.find(",")+1,s2.length() ) ;fConfigArr[3] = atoi(sub22.data());
if(fConfigArr[2]<fConfigArr[3] && fConfigArr[3]<1024){
fMonitor->SetRangeMax(fConfigArr[2],fConfigArr[3]);
error=0;
}
if(s3.find(",")!=string::npos){
- string sub3_1 = s3.substr(0,s3.find(",")) ;fConfigArr[4] = atoi(sub3_1.data());
- string sub3_2 = s3.substr(s3.find(",")+1,s3.length() ) ;fConfigArr[5] = atoi(sub3_2.data());
+ string sub31 = s3.substr(0,s3.find(",")) ;fConfigArr[4] = atoi(sub31.data());
+ string sub32 = s3.substr(s3.find(",")+1,s3.length() ) ;fConfigArr[5] = atoi(sub32.data());
if(fConfigArr[4]<fConfigArr[5] && fConfigArr[5]<1024){
fMonitor->SetRangeSum(fConfigArr[4],fConfigArr[5]);
error=0;
}
//_____________________________________________________________________________________________
-void AliTPCMonitorDialog::DoTab(Int_t id)
+void AliTPCMonitorDialog::DoTab(Int_t id)
{
printf("Tab item %d activated\n", id);
}
//_____________________________________________________________________________________________
-void AliTPCMonitorDialog::DoClose()
+void AliTPCMonitorDialog::DoClose() const
{
// Close the dialog window
printf("\nTerminating dialog: via window manager\n");
- CloseWindow();
+ CloseWindow();
// Close the Ged editor if it was activated.
if (TVirtualPadEditor::GetPadEditor(kFALSE) != 0)
TVirtualPadEditor::Terminate();
}
//_____________________________________________________________________________________________
-void AliTPCMonitorDialog::CloseWindow()
+void AliTPCMonitorDialog::CloseWindow() const
{
// Called when window is closed via the window manager.
delete this;
/* $Id$ */
////////////////////////////////////////////////////////////////////////
-//
-// AliTPCMonitorDialog class
-//
-// Class to handle dialogs for settings of files and configurations
-// for the AliTPCMonitor
-//
-// Author: Stefan Kniege, IKF, Frankfurt
-//
-//
+////
+//// AliTPCMonitorDialog class
+////
+//// Class to handle dialogs for settings of files and configurations
+//// for the AliTPCMonitor
+////
+//// Author: Stefan Kniege, IKF, Frankfurt
+////
+////
/////////////////////////////////////////////////////////////////////////
#include "TGFrame.h"
-#include "RQ_OBJECT.h"
#include "AliTPCMonitor.h"
class TGWindow;
class TGTransientFrame;
class TGTransientFrame;
class TGCompositeFrame;
class TGGroupFrame;
-class AliTPCMonitorDialog : public TNamed{
+class AliTPCMonitorDialog : public TNamed
+{
- RQ_OBJECT("AliTPCMonitorDialog")
-
-
public:
- AliTPCMonitorDialog(const TGWindow *p, const TGWindow *main, UInt_t w, UInt_t h, UInt_t options = kVerticalFrame, Int_t version =1, AliTPCMonitor* monitor =0);
- //AliTPCMonitorDialog(const AliTPCMonitorDialog &dialog);
- //AliTPCMonitorDialog& operator= (const AliTPCMonitorDialog& dialog);
+ AliTPCMonitorDialog(TGWindow *p, TGWindow *main, UInt_t w, UInt_t h, UInt_t options = kVerticalFrame, Int_t version =1, AliTPCMonitor* monitor =0);
+ AliTPCMonitorDialog(const AliTPCMonitorDialog &dialog);
+ AliTPCMonitorDialog& operator= (const AliTPCMonitorDialog& dialog);
virtual ~AliTPCMonitorDialog();
- void DoClose();
- void CloseWindow();
- void DoOK();
- void DoCancel();
- void DoTab(Int_t id);
- void HandleButtons(Int_t id = -1);
- void CreateDialogVersion(Int_t version);
-
+ void DoClose() const;
+ void CloseWindow() const;
+ void DoOK();
+ void DoCancel();
+ void DoTab(Int_t id);
+ void HandleButtons(Int_t id = -1);
+ void CreateDialogVersion(Int_t version);
+ UInt_t GetWidth() const { return fWidth; }
+ UInt_t GetHeight() const { return fHeight; }
+ UInt_t GetOptions() const { return fOptions; }
+ AliTPCMonitor* GetMonitor() const { return fMonitor; }
+ TGWindow* GetClient() const { return fClient; }
+ TGWindow* GetMainFrame() const { return fMain; }
+ Int_t GetVersion() const { return fVersion; }
private:
TGTransientFrame* fFrameMain; // Frames for dialog windows
TGLayoutHints* fLayout2; // Layout for window versoin 2
TGLayoutHints* fLayout3; // Layout for window version 3
-
+
+
TGTextBuffer* fBuf[7]; // Text buffer for GroupFrame
TGTextEntry* fEnt[7]; // Text entries for GroupFrame
AliTPCMonitor* fMonitor; // Pointer to AliTPCMonitor to be called
+ UInt_t fWidth; // Width of the window
+ UInt_t fHeight; // Height of the window
+ UInt_t fOptions; // Frame options
+ Int_t fVersion; // Version of the dialog
+ TGWindow* fClient; // TGClient of Dialog
+ TGWindow* fMain; // Main fraem for Dialog window
ClassDef(AliTPCMonitorDialog,1);
};
/*
$Log$
+Revision 1.2 2007/10/12 13:36:27 cvetan
+Coding convention fixes from Stefan
+
Revision 1.1 2007/09/17 10:23:31 cvetan
New TPC monitoring package from Stefan Kniege. The monitoring package can be started by running TPCMonitor.C macro located in macros folder.
*/
////////////////////////////////////////////////////////////////////////
-//
-// AliTPCMonitorFFT class
-//
-// Wrapper class to perform Fast Fourier Transformations.
-// The code is based on the Gnu Scientific Library.
-// See documentation of gsl for further details.
-//
-// Author: Stefan Kniege, IKF, Frankfurt
-//
-//
+////
+//// AliTPCMonitorFFT class
+////
+//// Wrapper class to perform Fast Fourier Transformations.
+//// The code is based on the Gnu Scientific Library.
+//// See documentation of gsl for further details.
+////
+//// Author: Stefan Kniege, IKF, Frankfurt
+////
+////
/////////////////////////////////////////////////////////////////////////
return ret;
}
- const Double_t norm = 1.0 / n;
+ const Double_t knorm = 1.0 / n;
size_t i;
for (i = 0; i < n; i++)
{
- REAL(data,stride,i) *= norm;
- IMAG(data,stride,i) *= norm;
+ REAL(data,stride,i) *= knorm;
+ IMAG(data,stride,i) *= knorm;
}
return ret;
for (bit = 0; bit < logn; bit++)
{
- Double_t w_real = 1.0;
- Double_t w_imag = 0.0;
+ Double_t wreal = 1.0;
+ Double_t wimag = 0.0;
- const Double_t theta = 2.0 * ((Int_t) sign) * M_PI / ((Double_t) (2 * dual));
+ const Double_t ktheta = 2.0 * ((Int_t) sign) * M_PI / ((Double_t) (2 * dual));
- const Double_t s = sin (theta);
- const Double_t t = sin (theta / 2.0);
- const Double_t s2 = 2.0 * t * t;
+ const Double_t ks = sin (ktheta);
+ const Double_t kt = sin (ktheta / 2.0);
+ const Double_t ks2 = 2.0 * kt * kt;
size_t a, b;
{
for (a = 0; a < n; a+= 2 * dual)
{
- const size_t i = b + a;
- const size_t j = b + a + dual;
+ const size_t ki = b + a;
+ const size_t kj = b + a + dual;
- const Double_t t1_real = REAL(data,stride,i) + REAL(data,stride,j);
- const Double_t t1_imag = IMAG(data,stride,i) + IMAG(data,stride,j);
- const Double_t t2_real = REAL(data,stride,i) - REAL(data,stride,j);
- const Double_t t2_imag = IMAG(data,stride,i) - IMAG(data,stride,j);
-
- REAL(data,stride,i) = t1_real;
- IMAG(data,stride,i) = t1_imag;
- REAL(data,stride,j) = w_real*t2_real - w_imag * t2_imag;
- IMAG(data,stride,j) = w_real*t2_imag + w_imag * t2_real;
+ const Double_t kt1real = REAL(data,stride,ki) + REAL(data,stride,kj);
+ const Double_t kt1imag = IMAG(data,stride,ki) + IMAG(data,stride,kj);
+ const Double_t kt2real = REAL(data,stride,ki) - REAL(data,stride,kj);
+ const Double_t kt2imag = IMAG(data,stride,ki) - IMAG(data,stride,kj);
+
+ REAL(data,stride,ki) = kt1real;
+ IMAG(data,stride,ki) = kt1imag;
+ REAL(data,stride,kj) = wreal*kt2real - wimag * kt2imag;
+ IMAG(data,stride,kj) = wreal*kt2imag + wimag * kt2real;
}
- /* trignometric recurrence for w-> exp(i theta) w */
+ /* trignometric recurrence for w-> exp(i ktheta) w */
{
- const Double_t tmp_real = w_real - s * w_imag - s2 * w_real;
- const Double_t tmp_imag = w_imag + s * w_real - s2 * w_imag;
- w_real = tmp_real;
- w_imag = tmp_imag;
+ const Double_t ktmpreal = wreal - ks * wimag - ks2 * wreal;
+ const Double_t ktmpimag = wimag + ks * wreal - ks2 * wimag;
+ wreal = ktmpreal;
+ wimag = ktmpimag;
}
}
dual /= 2;
}
//__________________________________________________________________
-Int_t AliTPCMonitorFFT::ComplexBitReverseOrderWrap(Double_t* data, Int_t stride, size_t n, Int_t logn)
+Int_t AliTPCMonitorFFT::ComplexBitReverseOrderWrap(Double_t* data, Int_t stride, size_t n, Int_t logn) const
{
// Wrapper function from gnu scientific library
/* This is the Goldrader bit-reversal algorithm */
if (i < j)
{
- const Double_t tmp_real = REAL(data,stride,i);
- const Double_t tmp_imag = IMAG(data,stride,i);
+ const Double_t ktmpreal = REAL(data,stride,i);
+ const Double_t ktmpimag = IMAG(data,stride,i);
REAL(data,stride,i) = REAL(data,stride,j);
IMAG(data,stride,i) = IMAG(data,stride,j);
- REAL(data,stride,j) = tmp_real;
- IMAG(data,stride,j) = tmp_imag;
+ REAL(data,stride,j) = ktmpreal;
+ IMAG(data,stride,j) = ktmpimag;
}
while (k <= j)
}
//__________________________________________________________________
-Int_t AliTPCMonitorFFT::FFTBinaryLogn(size_t n)
+Int_t AliTPCMonitorFFT::FFTBinaryLogn(size_t n) const
{
// Return log on base 2
size_t ntest ;
- size_t binary_logn = 0 ;
+ size_t binarylogn = 0 ;
size_t k = 1;
while (k < n)
{
k *= 2;
- binary_logn++;
+ binarylogn++;
}
- ntest = (1 << binary_logn) ;
+ ntest = (1 << binarylogn) ;
if (n != ntest )
{
return -1 ; /* n is not a power of 2 */
}
- return binary_logn;
+ return binarylogn;
}
////////////////////////////////////////////////////////////////////////
-//
-// AliTPCMonitorFFT class
-//
-// Wrapper class to perform Fast Fourier Transformations
-// Code based on Gnu Scientific Library
-// See documentation of gsl for further details
-//
-// Author: Stefan Kniege, IKF, Frankfurt
-//
-//
+////
+//// AliTPCMonitorFFT class
+////
+//// Wrapper class to perform Fast Fourier Transformations
+//// Code based on Gnu Scientific Library
+//// See documentation of gsl for further details
+////
+//// Author: Stefan Kniege, IKF, Frankfurt
+////
+////
/////////////////////////////////////////////////////////////////////////
Int_t ComplexRadix2BackwardWrap( Double_t* data, Int_t stride, size_t n );
Int_t ComplexRadix2InverseWrap( Double_t* data, Int_t stride, size_t n );
Int_t ComplexRadix2TransformWrap(Double_t* data, Int_t stride, size_t n, Int_t sign );
- Int_t ComplexBitReverseOrderWrap(Double_t* data, Int_t stride, size_t n, Int_t logn);
- Int_t FFTBinaryLogn(size_t n);
+ Int_t ComplexBitReverseOrderWrap(Double_t* data, Int_t stride, size_t n, Int_t logn) const ;
+ Int_t FFTBinaryLogn(size_t n) const ;
private:
/*
$Log$
+ Revision 1.2 2007/10/12 13:36:27 cvetan
+ Coding convention fixes from Stefan
+
Revision 1.1 2007/09/17 10:23:31 cvetan
New TPC monitoring package from Stefan Kniege. The monitoring package can be started by running TPCMonitor.C macro located in macros folder.
*/
////////////////////////////////////////////////////////////////////////
-//
-// AliTPCMonitorMappingHandler class
-//
-// Class for handling mapping information TPC
-//
-// The mapping information for the TPC front end electornics (pads, front end cards)
-// are handled by this class.
-// The information from the design mapping and from the hardware address can be
-// cross checked in the TPCMonitor.C.
-// Malfunctioning front end cards can be identified by looking at single channels
-// displayed with the TPCMonitor.
-//
-//
-// Authors: Roland Bramm,
-// Stefan Kniege, IKF, Frankfurt
-//
+////
+//// AliTPCMonitorMappingHandler class
+////
+//// Class for handling mapping information TPC
+////
+//// The mapping information for the TPC front end electornics (pads, front end cards)
+//// are handled by this class.
+//// The information from the design mapping and from the hardware address can be
+//// cross checked in the TPCMonitor.C.
+//// Malfunctioning front end cards can be identified by looking at single channels
+//// displayed with the TPCMonitor.
+////
+////
+//// Authors: Roland Bramm,
+//// Stefan Kniege, IKF, Frankfurt
+////
/////////////////////////////////////////////////////////////////////////
Int_t fsector = 0;
Int_t fec = 0;
Int_t branch = 0;
- Int_t rcu_patch = 0;
+ Int_t rcupatch = 0;
Int_t altrchann = 0;
Int_t altrchip = 0;
Int_t nextHwAddress = 0;
nfecs++;
fec = U2fGetFECinBranch(ind);
branch = U2fGetBranch(ind);
- rcu_patch = U2fGetRCU(ind);
+ rcupatch = U2fGetRCU(ind);
for(Int_t ch = 0; ch<128; ch++)
{
altrchann = ch%16;
altrchip = ch/16;
- nextHwAddress = ( ((branch&1)<<11) + (fec<<7) + (altrchip<<4) + (altrchann) + ((rcu_patch-1)<<12) );
+ nextHwAddress = ( ((branch&1)<<11) + (fec<<7) + (altrchip<<4) + (altrchann) + ((rcupatch-1)<<12) );
fMapHwFECglobal[nextHwAddress][0] = ind;
fMapHwFECglobal[nextHwAddress][1] = ch ;
//_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::GetNumOfChannels()
+Int_t AliTPCMonitorMappingHandler::GetNumOfChannels() const
{
// Return number of channels
return fnumofChannels;
}
//_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::GetSizeofArray()
+Int_t AliTPCMonitorMappingHandler::GetSizeofArray() const
{
// Return sise of global mapping fmapping array.
// Value orresponds to max value of hardware addresses
//_____________________________________________________________________________________________
-Short_t* AliTPCMonitorMappingHandler::GetLine(Int_t hwaddr)
+Short_t* AliTPCMonitorMappingHandler::GetLine(Int_t hwaddr)const
{
// Return pointer to mapping array for the hardware address hwaddr
Short_t* retval;
}
//_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::GetIndex(Int_t hwaddr)
+Int_t AliTPCMonitorMappingHandler::GetIndex(Int_t hwaddr) const
{
// Return readout index for the hardware address hwaddr
Int_t retval;
}
//_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::GetPadRow(Int_t hwaddr)
+Int_t AliTPCMonitorMappingHandler::GetPadRow(Int_t hwaddr) const
{
// Return global pad row for the hardware address hwaddr
Int_t retval;
}
//_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::GetPad(Int_t hwaddr)
+Int_t AliTPCMonitorMappingHandler::GetPad(Int_t hwaddr) const
{
// Return pad number in row for the hardware address hwaddr
Int_t retval;
}
//_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::GetConnector(Int_t hwaddr)
+Int_t AliTPCMonitorMappingHandler::GetConnector(Int_t hwaddr) const
{
// Return connector for the hardware address hwaddr
Int_t retval;
}
//_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::GetPin(Int_t hwaddr)
+Int_t AliTPCMonitorMappingHandler::GetPin(Int_t hwaddr) const
{
// Return pin for the hardware address hwaddr
Int_t retval;
}
//_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::GetFEC(Int_t hwaddr)
+Int_t AliTPCMonitorMappingHandler::GetFEC(Int_t hwaddr) const
{
// Return fec number in IROC/OROC for the hardware address hwaddr
Int_t retval;
}
//_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::GetFECchannel(Int_t hwaddr)
+Int_t AliTPCMonitorMappingHandler::GetFECchannel(Int_t hwaddr) const
{
// Return FEC channel for the hardware address hwaddr
Int_t retval;
}
//_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::GetFECconnector(Int_t hwaddr)
+Int_t AliTPCMonitorMappingHandler::GetFECconnector(Int_t hwaddr) const
{
// Return FEC connector for the hardware address hwaddr
Int_t retval;
}
//_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::GetAltroChannel(Int_t hwaddr)
+Int_t AliTPCMonitorMappingHandler::GetAltroChannel(Int_t hwaddr) const
{
// Return Altro channel for the hardware address hwaddr
Int_t retval;
}
//_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::GetAltro(Int_t hwaddr)
+Int_t AliTPCMonitorMappingHandler::GetAltro(Int_t hwaddr) const
{
// Return Altro chip number in FEC for the hardware address hwaddr
Int_t retval;
//_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::GetNumofPads(Int_t row)
+Int_t AliTPCMonitorMappingHandler::GetNumofPads(Int_t row)
{
// Return number of pads in row
if(row<159)
//_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::U2fGetFECnr(Int_t index)
+Int_t AliTPCMonitorMappingHandler::U2fGetFECnr(Int_t index) const
{
// Return FEC number for index (FEC number should be equal to index)
return fu2ftestmapping[index][0];
}
//_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::U2fGetSide(Int_t fecnr)
+Int_t AliTPCMonitorMappingHandler::U2fGetSide(Int_t fecnr) const
{
// Return side on which FEC is installed
return fu2ftestmapping[fecnr][1];
}
//_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::U2fGetSector(Int_t fecnr)
+Int_t AliTPCMonitorMappingHandler::U2fGetSector(Int_t fecnr) const
{
// Return sector in which FEC is installed
return fu2ftestmapping[fecnr][2];
}
//_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::U2fGetRCU(Int_t fecnr)
+Int_t AliTPCMonitorMappingHandler::U2fGetRCU(Int_t fecnr) const
{
// Rerurn rcu patch in which FEC is installed
return fu2ftestmapping[fecnr][3];
}
//_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::U2fGetFECinRCU(Int_t fecnr)
+Int_t AliTPCMonitorMappingHandler::U2fGetFECinRCU(Int_t fecnr) const
{
// Return index of FEC in RCU (0-25)
return fu2ftestmapping[fecnr][4];
}
//_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::U2fGetFECinBranch(Int_t fecnr)
+Int_t AliTPCMonitorMappingHandler::U2fGetFECinBranch(Int_t fecnr) const
{
// Return index of FEC in branch (0-12)
return fu2ftestmapping[fecnr][5];
}
//_____________________________________________________________________________________________
-Int_t AliTPCMonitorMappingHandler::U2fGetBranch(Int_t fecnr)
+Int_t AliTPCMonitorMappingHandler::U2fGetBranch(Int_t fecnr) const
{
// Return branch in which FEC is installed (0,1)
return fu2ftestmapping[fecnr][6];
/* $Id$ */
////////////////////////////////////////////////////////////////////////
-//
-// AliTPCMonitorMappingHandler class
-//
-// Class for handling mapping information TPC
-//
-// Authors: Roland Bramm,
-// Stefan Kniege, IKF, Frankfurt
-//
+////
+//// AliTPCMonitorMappingHandler class
+////
+//// Class for handling mapping information TPC
+////
+//// Authors: Roland Bramm,
+//// Stefan Kniege, IKF, Frankfurt
+////
/////////////////////////////////////////////////////////////////////////
#include "TNamed.h"
void ReadMapping(char* mapfile);
void ReadRowMappingGlob(char* fpathtoMappingRowfile) ;
- Int_t GetNumOfChannels();
- Int_t GetSizeofArray();
- Short_t* GetLine( Int_t channel);
- Int_t GetIndex( Int_t channel);
- Int_t GetPadRow( Int_t channel);
- Int_t GetPad( Int_t channel);
- Int_t GetConnector( Int_t channel);
- Int_t GetPin( Int_t channel);
- Int_t GetFEC( Int_t channel);
- Int_t GetFECchannel( Int_t channel);
- Int_t GetFECconnector( Int_t channel);
- Int_t GetAltroChannel( Int_t channel);
- Int_t GetAltro( Int_t channel);
+ Int_t GetNumOfChannels() const;
+ Int_t GetSizeofArray() const ;
+ Short_t* GetLine( Int_t channel) const;
+ Int_t GetIndex( Int_t channel) const;
+ Int_t GetPadRow( Int_t channel) const;
+ Int_t GetPad( Int_t channel) const;
+ Int_t GetConnector( Int_t channel) const;
+ Int_t GetPin( Int_t channel) const;
+ Int_t GetFEC( Int_t channel) const;
+ Int_t GetFECchannel( Int_t channel) const;
+ Int_t GetFECconnector( Int_t channel) const;
+ Int_t GetAltroChannel( Int_t channel) const;
+ Int_t GetAltro( Int_t channel) const;
Int_t GetPadAddInRow( Int_t row, Int_t pad);
Int_t GetNumofPads( Int_t row);
void ReadfecHwMap( Int_t sector);
void ReadfecGainMap( char* fecgainmap);
- Int_t U2fGetBranch( Int_t fecnr);
- Int_t U2fGetRCU( Int_t fecnr);
- Int_t U2fGetFECinRCU( Int_t fecnr);
- Int_t U2fGetFECinBranch(Int_t fecnr);
- Int_t U2fGetSide( Int_t fecnr);
- Int_t U2fGetSector( Int_t fecnr);
- Int_t U2fGetFECnr( Int_t index);
+ Int_t U2fGetBranch( Int_t fecnr) const;
+ Int_t U2fGetRCU( Int_t fecnr) const;
+ Int_t U2fGetFECinRCU( Int_t fecnr) const;
+ Int_t U2fGetFECinBranch(Int_t fecnr) const;
+ Int_t U2fGetSide( Int_t fecnr) const;
+ Int_t U2fGetSector( Int_t fecnr) const;
+ Int_t U2fGetFECnr( Int_t index) const;
- Int_t GetFECfromHw(Int_t hw) { return fMapHwFECglobal[hw][0];}
- Int_t GetFECChfromHw(Int_t hw) { return fMapHwFECglobal[hw][1];}
- Float_t GetFECchGain(Int_t fec, Int_t ch) { return fecGainMap[fec][ch];}
+ Int_t GetFECfromHw(Int_t hw) const { return fMapHwFECglobal[hw][0];}
+ Int_t GetFECChfromHw(Int_t hw) const { return fMapHwFECglobal[hw][1];}
+ Float_t GetFECchGain(Int_t fec, Int_t ch) const { return fecGainMap[fec][ch];}
private: