/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes
DybCableSvc Class Reference

#include <DybCableSvc.h>

Inheritance diagram for DybCableSvc:
Inheritance graph
[legend]
Collaboration diagram for DybCableSvc:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 DybCableSvc (const std::string &name, ISvcLocator *svc)
virtual ~DybCableSvc ()
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvInterface)
virtual const std::vector
< DayaBay::HardwareId > & 
hardwareIds (const ServiceMode &svcMode)
virtual const std::vector
< DayaBay::PmtHardwareId > & 
pmtHardwareIds (const ServiceMode &svcMode)
virtual const std::vector
< DayaBay::RpcHardwareId > & 
rpcHardwareIds (const ServiceMode &svcMode)
virtual const std::vector
< DayaBay::FeeHardwareId > & 
feeHardwareIds (const ServiceMode &svcMode)
virtual const std::vector
< DayaBay::FecHardwareId > & 
fecHardwareIds (const ServiceMode &svcMode)
virtual const std::vector
< DayaBay::DetectorSensor > & 
sensors (const ServiceMode &svcMode)
virtual const std::vector
< DayaBay::AdPmtSensor > & 
adPmtSensors (const ServiceMode &svcMode)
virtual const std::vector
< DayaBay::PoolPmtSensor > & 
poolPmtSensors (const ServiceMode &svcMode)
virtual const std::vector
< DayaBay::RpcSensor > & 
rpcSensors (const ServiceMode &svcMode)
virtual const std::vector
< DayaBay::ElecChannelId > & 
elecChannelIds (const ServiceMode &svcMode)
virtual const std::vector
< DayaBay::FeeChannelId > & 
feeChannelIds (const ServiceMode &svcMode)
virtual const std::vector
< DayaBay::FecChannelId > & 
fecChannelIds (const ServiceMode &svcMode)
virtual DayaBay::ElecChannelId elecChannelId (const DayaBay::DetectorSensor &sensId, const ServiceMode &svcMode)
virtual DayaBay::FeeChannelId feeChannelId (const DayaBay::AdPmtSensor &sensId, const ServiceMode &svcMode)
virtual DayaBay::FeeChannelId feeChannelId (const DayaBay::PoolPmtSensor &sensId, const ServiceMode &svcMode)
virtual DayaBay::FecChannelId fecChannelId (const DayaBay::RpcSensor &sensId, const ServiceMode &svcMode)
virtual DayaBay::DetectorSensor sensor (const DayaBay::ElecChannelId &elecChannel, const ServiceMode &svcMode)
virtual DayaBay::AdPmtSensor adPmtSensor (const DayaBay::FeeChannelId &feeChannel, const ServiceMode &svcMode)
virtual DayaBay::PoolPmtSensor poolPmtSensor (const DayaBay::FeeChannelId &feeChannel, const ServiceMode &svcMode)
virtual DayaBay::RpcSensor rpcSensor (const DayaBay::FecChannelId &fecChannel, const ServiceMode &svcMode)
virtual DayaBay::HardwareId hardwareId (const DayaBay::DetectorSensor &sensId, const ServiceMode &svcMode)
virtual DayaBay::PmtHardwareId pmtHardwareId (const DayaBay::AdPmtSensor &sensId, const ServiceMode &svcMode)
virtual DayaBay::PmtHardwareId pmtHardwareId (const DayaBay::PoolPmtSensor &sensId, const ServiceMode &svcMode)
virtual DayaBay::RpcHardwareId rpcHardwareId (const DayaBay::RpcSensor &sensId, const ServiceMode &svcMode)
virtual DayaBay::DetectorSensor sensor (const DayaBay::HardwareId &hardwareId, const ServiceMode &svcMode)
virtual DayaBay::AdPmtSensor adPmtSensor (const DayaBay::PmtHardwareId &pmtId, const ServiceMode &svcMode)
virtual DayaBay::PoolPmtSensor poolPmtSensor (const DayaBay::PmtHardwareId &pmtId, const ServiceMode &svcMode)
virtual DayaBay::RpcSensor rpcSensor (const DayaBay::RpcHardwareId &rpcId, const ServiceMode &svcMode)
virtual DayaBay::HardwareId hardwareId (const DayaBay::ElecChannelId &elecChannel, const ServiceMode &svcMode)
virtual DayaBay::FeeHardwareId feeHardwareId (const DayaBay::FeeChannelId &feeChannel, const ServiceMode &svcMode)
virtual DayaBay::FecHardwareId fecHardwareId (const DayaBay::FecChannelId &fecChannel, const ServiceMode &svcMode)
virtual DayaBay::ElecChannelId elecChannelId (const DayaBay::HardwareId &hardwareId, const ServiceMode &svcMode)
virtual DayaBay::FeeChannelId feeChannelId (const DayaBay::FeeHardwareId &feeHardwareId, const ServiceMode &svcMode)
virtual DayaBay::FecChannelId fecChannelId (const DayaBay::FecHardwareId &fecHardwareId, const ServiceMode &svcMode)

Static Public Member Functions

static const InterfaceID & interfaceID ()

Private Types

typedef std::map< ServiceMode,
DybCableCache
CacheMap

Private Member Functions

DybCableCacheupdate (const ServiceMode &svcMode)

Private Attributes

CacheMap m_cache

Detailed Description

Definition at line 11 of file DybCableSvc.h.


Member Typedef Documentation

typedef std::map<ServiceMode,DybCableCache> DybCableSvc::CacheMap [private]

Definition at line 172 of file DybCableSvc.h.


Constructor & Destructor Documentation

DybCableSvc::DybCableSvc ( const std::string &  name,
ISvcLocator *  svc 
)

Definition at line 5 of file DybCableSvc.cc.

    : Service(name,svc)
{

}
DybCableSvc::~DybCableSvc ( ) [virtual]

Definition at line 10 of file DybCableSvc.cc.

{
}

Member Function Documentation

StatusCode DybCableSvc::queryInterface ( const InterfaceID &  riid,
void **  ppvInterface 
) [virtual]

Definition at line 15 of file DybCableSvc.cc.

{
    StatusCode sc = StatusCode::FAILURE;
    if (ppvInterface) {
        *ppvInterface = 0;
    
        if (ICableSvc::interfaceID().versionMatch(riid)) {
            *ppvInterface = static_cast<ICableSvc*>(this);
            sc = StatusCode::SUCCESS;
            addRef();
        }
        else sc = Service::queryInterface( riid, ppvInterface );    
    }
    return sc;
}
const std::vector< DayaBay::HardwareId > & DybCableSvc::hardwareIds ( const ServiceMode svcMode) [virtual]

Implements ICableSvc.

Definition at line 43 of file DybCableSvc.cc.

{
    return update(sm).hardwareIds;
}
const std::vector< DayaBay::PmtHardwareId > & DybCableSvc::pmtHardwareIds ( const ServiceMode svcMode) [virtual]

Implements ICableSvc.

Definition at line 48 of file DybCableSvc.cc.

{
    return update(sm).pmtHardwareIds;
}
const std::vector< DayaBay::RpcHardwareId > & DybCableSvc::rpcHardwareIds ( const ServiceMode svcMode) [virtual]

Implements ICableSvc.

Definition at line 53 of file DybCableSvc.cc.

{
    return update(sm).rpcHardwareIds;
}
const std::vector< DayaBay::FeeHardwareId > & DybCableSvc::feeHardwareIds ( const ServiceMode svcMode) [virtual]

Implements ICableSvc.

Definition at line 58 of file DybCableSvc.cc.

{
    return update(sm).feeHardwareIds;
}
const std::vector< DayaBay::FecHardwareId > & DybCableSvc::fecHardwareIds ( const ServiceMode svcMode) [virtual]

Implements ICableSvc.

Definition at line 63 of file DybCableSvc.cc.

{
    return update(sm).fecHardwareIds;
}
const std::vector< DayaBay::DetectorSensor > & DybCableSvc::sensors ( const ServiceMode svcMode) [virtual]

Implements ICableSvc.

Definition at line 70 of file DybCableSvc.cc.

{
    return update(sm).sensors;
}
const std::vector< DayaBay::AdPmtSensor > & DybCableSvc::adPmtSensors ( const ServiceMode svcMode) [virtual]

Implements ICableSvc.

Definition at line 75 of file DybCableSvc.cc.

{
    return update(sm).adPmtSensors;
}
const std::vector< DayaBay::PoolPmtSensor > & DybCableSvc::poolPmtSensors ( const ServiceMode svcMode) [virtual]

Implements ICableSvc.

Definition at line 80 of file DybCableSvc.cc.

{
    return update(sm).poolPmtSensors;
}
const std::vector< DayaBay::RpcSensor > & DybCableSvc::rpcSensors ( const ServiceMode svcMode) [virtual]

Implements ICableSvc.

Definition at line 85 of file DybCableSvc.cc.

{
    return update(sm).rpcSensors;
}
const std::vector< DayaBay::ElecChannelId > & DybCableSvc::elecChannelIds ( const ServiceMode svcMode) [virtual]

Implements ICableSvc.

Definition at line 92 of file DybCableSvc.cc.

{
    return update(sm).elecChannelIds;
}
const std::vector< DayaBay::FeeChannelId > & DybCableSvc::feeChannelIds ( const ServiceMode svcMode) [virtual]

Implements ICableSvc.

Definition at line 97 of file DybCableSvc.cc.

{
    return update(sm).feeChannelIds;
}
const std::vector< DayaBay::FecChannelId > & DybCableSvc::fecChannelIds ( const ServiceMode svcMode) [virtual]

Implements ICableSvc.

Definition at line 102 of file DybCableSvc.cc.

{
    return update(sm).fecChannelIds;
}
DayaBay::ElecChannelId DybCableSvc::elecChannelId ( const DayaBay::DetectorSensor sensId,
const ServiceMode svcMode 
) [virtual]

Implements ICableSvc.

Definition at line 111 of file DybCableSvc.cc.

{
    return update(sm).channelBySensor[sens];
}
DayaBay::FeeChannelId DybCableSvc::feeChannelId ( const DayaBay::AdPmtSensor sensId,
const ServiceMode svcMode 
) [virtual]

Implements ICableSvc.

Definition at line 120 of file DybCableSvc.cc.

{
    DetectorSensor ds(sens.fullPackedData());
    ElecChannelId chan = update(sm).channelBySensor[ds];
    return FeeChannelId(chan.fullPackedData());
}
DayaBay::FeeChannelId DybCableSvc::feeChannelId ( const DayaBay::PoolPmtSensor sensId,
const ServiceMode svcMode 
) [virtual]

Implements ICableSvc.

Definition at line 131 of file DybCableSvc.cc.

{
    DetectorSensor ds(sens.fullPackedData());
    ElecChannelId chan = update(sm).channelBySensor[ds];
    return FeeChannelId(chan.fullPackedData());
}
DayaBay::FecChannelId DybCableSvc::fecChannelId ( const DayaBay::RpcSensor sensId,
const ServiceMode svcMode 
) [virtual]

Implements ICableSvc.

Definition at line 142 of file DybCableSvc.cc.

{
    // check if this is a whole panel                                                                                 
    if ( sens.panel().fullPackedData() == sens.fullPackedData() ) {
        DayaBay::RpcSensor helper(sens.panelRow(),sens.panelColumn(),
                                  1, 1, sens.site(), sens.detectorId());
        DetectorSensor ds(helper.fullPackedData());
        ElecChannelId chan = update(sm).channelBySensor[ds];
        return FecChannelId(chan.fullPackedData()).boardId();
    }

    DetectorSensor ds(sens.fullPackedData());
    ElecChannelId chan = update(sm).channelBySensor[ds];
    return FecChannelId(chan.fullPackedData());
}
DayaBay::DetectorSensor DybCableSvc::sensor ( const DayaBay::ElecChannelId elecChannel,
const ServiceMode svcMode 
) [virtual]

Implements ICableSvc.

Definition at line 164 of file DybCableSvc.cc.

{
    return update(sm).sensorByChannel[chan];
}
DayaBay::AdPmtSensor DybCableSvc::adPmtSensor ( const DayaBay::FeeChannelId feeChannel,
const ServiceMode svcMode 
) [virtual]

Implements ICableSvc.

Definition at line 173 of file DybCableSvc.cc.

{
    ElecChannelId chanId(chan.fullPackedData());
    DetectorSensor ds = update(sm).sensorByChannel[chanId];
    return AdPmtSensor(ds.fullPackedData());
}
DayaBay::PoolPmtSensor DybCableSvc::poolPmtSensor ( const DayaBay::FeeChannelId feeChannel,
const ServiceMode svcMode 
) [virtual]

Implements ICableSvc.

Definition at line 184 of file DybCableSvc.cc.

{
    ElecChannelId chanId(chan.fullPackedData());
    DetectorSensor ds = update(sm).sensorByChannel[chanId];
    return PoolPmtSensor(ds.fullPackedData());
}
DayaBay::RpcSensor DybCableSvc::rpcSensor ( const DayaBay::FecChannelId fecChannel,
const ServiceMode svcMode 
) [virtual]

Implements ICableSvc.

Definition at line 195 of file DybCableSvc.cc.

{
    // check if we are dealing with full board Id
    // --- Can't do it yet - cable map does not follow expected convention, that is connector==0 => FEC board Id,
    // instead, it counts connectors from 0 to 31.
    // ---
    // if (chan.connector() == 0) {
    //     DayaBay::ElecChannelId helper(chan.board(), 1, chan.site(), chan.detectorId());
    //  ElecChannelId chanId(helper.fullPackedData());
    //  DetectorSensor ds = update(sm).sensorByChannel[chanId];
    //  return DayaBay::RpcSensor(ds.fullPackedData()).panel();
    // }
    ElecChannelId chanId(chan.fullPackedData());
    DetectorSensor ds = update(sm).sensorByChannel[chanId];
    return RpcSensor(ds.fullPackedData());
}
DayaBay::HardwareId DybCableSvc::hardwareId ( const DayaBay::DetectorSensor sensId,
const ServiceMode svcMode 
) [virtual]

Implements ICableSvc.

Definition at line 218 of file DybCableSvc.cc.

{
    return update(sm).hardwareBySensor[sens];
}
DayaBay::PmtHardwareId DybCableSvc::pmtHardwareId ( const DayaBay::AdPmtSensor sensId,
const ServiceMode svcMode 
) [virtual]

Implements ICableSvc.

Definition at line 227 of file DybCableSvc.cc.

{
    DetectorSensor ds(sens.fullPackedData());
    HardwareId hwid = update(sm).hardwareBySensor[ds];
    return PmtHardwareId(hwid.fullPackedData());
}
DayaBay::PmtHardwareId DybCableSvc::pmtHardwareId ( const DayaBay::PoolPmtSensor sensId,
const ServiceMode svcMode 
) [virtual]

Implements ICableSvc.

Definition at line 238 of file DybCableSvc.cc.

{
    DetectorSensor ds(sens.fullPackedData());
    HardwareId hwid = update(sm).hardwareBySensor[ds];
    return PmtHardwareId(hwid.fullPackedData());
}
DayaBay::RpcHardwareId DybCableSvc::rpcHardwareId ( const DayaBay::RpcSensor sensId,
const ServiceMode svcMode 
) [virtual]

Implements ICableSvc.

Definition at line 249 of file DybCableSvc.cc.

{
    DetectorSensor ds(sens.fullPackedData());
    HardwareId hwid = update(sm).hardwareBySensor[ds];
    return RpcHardwareId(hwid.fullPackedData());
}
DayaBay::DetectorSensor DybCableSvc::sensor ( const DayaBay::HardwareId hardwareId,
const ServiceMode svcMode 
) [virtual]

Implements ICableSvc.

Definition at line 262 of file DybCableSvc.cc.

DayaBay::AdPmtSensor DybCableSvc::adPmtSensor ( const DayaBay::PmtHardwareId pmtId,
const ServiceMode svcMode 
) [virtual]

Implements ICableSvc.

Definition at line 271 of file DybCableSvc.cc.

{
    HardwareId hwid(hardwareId.fullPackedData());
    DetectorSensor ds = update(sm).sensorByHardware[hwid];
    return AdPmtSensor(ds.fullPackedData());
}
DayaBay::PoolPmtSensor DybCableSvc::poolPmtSensor ( const DayaBay::PmtHardwareId pmtId,
const ServiceMode svcMode 
) [virtual]

Implements ICableSvc.

Definition at line 282 of file DybCableSvc.cc.

{
    HardwareId hwid(hardwareId.fullPackedData());
    DetectorSensor ds = update(sm).sensorByHardware[hwid];
    return PoolPmtSensor(ds.fullPackedData());
}
DayaBay::RpcSensor DybCableSvc::rpcSensor ( const DayaBay::RpcHardwareId rpcId,
const ServiceMode svcMode 
) [virtual]

Implements ICableSvc.

Definition at line 293 of file DybCableSvc.cc.

{
    HardwareId hwid(hardwareId.fullPackedData());
    DetectorSensor ds = update(sm).sensorByHardware[hwid];
    return RpcSensor(ds.fullPackedData());
}
DayaBay::HardwareId DybCableSvc::hardwareId ( const DayaBay::ElecChannelId elecChannel,
const ServiceMode svcMode 
) [virtual]

Implements ICableSvc.

Definition at line 306 of file DybCableSvc.cc.

{
    return update(sm).hardwareByChannel[chan];
}
DayaBay::FeeHardwareId DybCableSvc::feeHardwareId ( const DayaBay::FeeChannelId feeChannel,
const ServiceMode svcMode 
) [virtual]

Implements ICableSvc.

Definition at line 315 of file DybCableSvc.cc.

{
    ElecChannelId chanId(chan.fullPackedData());
    HardwareId hwid = update(sm).hardwareByChannel[chanId];
    return FeeHardwareId(hwid.fullPackedData());
}
DayaBay::FecHardwareId DybCableSvc::fecHardwareId ( const DayaBay::FecChannelId fecChannel,
const ServiceMode svcMode 
) [virtual]

Implements ICableSvc.

Definition at line 326 of file DybCableSvc.cc.

{
    ElecChannelId chanId(chan.fullPackedData());
    HardwareId hwid = update(sm).hardwareByChannel[chanId];
    return FecHardwareId(hwid.fullPackedData());
}
DayaBay::ElecChannelId DybCableSvc::elecChannelId ( const DayaBay::HardwareId hardwareId,
const ServiceMode svcMode 
) [virtual]

Implements ICableSvc.

Definition at line 339 of file DybCableSvc.cc.

DayaBay::FeeChannelId DybCableSvc::feeChannelId ( const DayaBay::FeeHardwareId feeHardwareId,
const ServiceMode svcMode 
) [virtual]

Implements ICableSvc.

Definition at line 348 of file DybCableSvc.cc.

{
    HardwareId hwid(hardwareId.fullPackedData());
    ElecChannelId chan = update(sm).channelByHardware[hwid];
    return FeeChannelId(chan.fullPackedData());
}
DayaBay::FecChannelId DybCableSvc::fecChannelId ( const DayaBay::FecHardwareId fecHardwareId,
const ServiceMode svcMode 
) [virtual]

Implements ICableSvc.

Definition at line 359 of file DybCableSvc.cc.

{
    HardwareId hwid(hardwareId.fullPackedData());
    ElecChannelId chan = update(sm).channelByHardware[hwid];
    return FecChannelId(chan.fullPackedData());
}
DybCableCache & DybCableSvc::update ( const ServiceMode svcMode) [private]

Definition at line 33 of file DybCableSvc.cc.

{
    Context ctx = sm.context();
    ctx.SetTimeStamp(TimeStamp::GetBOT());
    ServiceMode mysm(ctx,sm.task());
    DybCableCache& cc = m_cache[mysm];
    cc.update(sm);
    return cc;
}

Member Data Documentation

Definition at line 173 of file DybCableSvc.h.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:00:00 for DybMetaDataSvc by doxygen 1.7.4