#pragma implementation
#include "TClass.h"
#include "hades.h"
#include "hpario.h"
#include "hparrootfileio.h"
#include "hdetpario.h"
#include "hparasciifileio.h"
#include "hparhadasciifileio.h"
#include "hcategory.h"
#include "hmatrixcategorysplit.h"
#include "hmatrixcategory.h"
#include "hlinearcategory.h"
#include "htaskset.h"
#include "htriggerdetector.h"
#include "triggerinfodef.h"
#include "muEmulation.h"
#include "muEmulationSim.h"
#include "muEmulationExp.h"
#include "muDilepEmulation.h"
#include "muDilepEmulationSim.h"
#include "muDilepEmulationExp.h"
#include "htriggerparrootfileio.h"
#include "htriggerparasciifileio.h"
HTriggerDetector::HTriggerDetector(void) : HDetector("Trigger","The TRIGGER detector")
{
}
HTriggerDetector::~HTriggerDetector(void)
{
}
HTask *HTriggerDetector::buildTask(const Text_t *name,const Option_t *opt)
{
if (name && strcmp(name, "default")==0)
{
HTaskSet *pDetTasks = new HTaskSet();
return pDetTasks;
}
return HDetector::buildTask(name, opt);
}
HCategory *HTriggerDetector::buildLinearCat(const Text_t *classname)
{
HLinearCategory *category=NULL;
category = new HLinearCategory(classname);
return category;
}
HCategory *HTriggerDetector::buildMatrixCat(const Text_t *classname,Float_t fillRate)
{
Int_t maxSector=0;
Int_t i,sizes[3];
HMatrixCategory *category=NULL;
for (i = 0; i < 6; i++) if (getModule(i,0) > 0) maxSector++;
sizes[0] = maxSector;
sizes[1] = sizes[2] = 96;
category = new HMatrixCategory(classname,3,sizes,fillRate);
return category;
}
HCategory* HTriggerDetector::buildSimMatrixCat(const Text_t *classname,Float_t fillRate,Int_t size)
{
HMatrixCategory *category = NULL;
Int_t ini[2];
ini[0] = 6;
ini[1] = size;
category = new HMatrixCategory(classname, 2, ini, fillRate);
return category;
}
HCategory *HTriggerDetector::buildCategory(Cat_t cat)
{
switch (cat) {
case catMUEMULeptons: return buildLinearCat("HMUEMULeptons");
case catMUEMUDiLeptons: return buildLinearCat("HMUEMUDiLeptons");
case catHardRichHit: return buildLinearCat("HRichHitIPU");
case catShowerCalIPU : return buildLinearCat("HShowerCalIPU");
case catShowerHitIPU : return buildLinearCat("HShowerHitIPU");
default: return NULL;
}
}
void HTriggerDetector::activateParIo(HParIo* io)
{
if (strcmp(io->IsA()->GetName(),"HParOraIo")==0) {
io->setDetParIo("HTriggerParIo");
return;
}
if (strcmp(io->IsA()->GetName(),"HParRootFileIo")==0) {
HTriggerParRootFileIo* p=new HTriggerParRootFileIo(((HParRootFileIo*)io)->getParRootFile());
io->setDetParIo(p);
}
if (strcmp(io->IsA()->GetName(),"HParAsciiFileIo")==0) {
HTriggerParAsciiFileIo* p=new HTriggerParAsciiFileIo(((HParAsciiFileIo*)io)->getFile());
io->setDetParIo(p);
}
}
Bool_t HTriggerDetector::write(HParIo* output)
{
HDetParIo* out=output->getDetParIo("HTriggerParIo");
if (out) return out->write(this);
return kFALSE;
}
ClassImp(HTriggerDetector)
Last change: Sat May 22 13:17:10 2010
Last generated: 2010-05-22 13:17
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.