Trig::WebBunchCrossingTool Class Reference

Bunch crossing tool reading the configuration from the web. More...

#include <WebBunchCrossingTool.h>

Inheritance diagram for Trig::WebBunchCrossingTool:
Trig::BunchCrossingToolBase Trig::IBunchCrossingTool asg::AsgMetadataTool asg::IAsgTool asg::AsgTool asg::IAsgTool

List of all members.

Classes

class  IOV
 Simplified IOV class. More...

Public Member Functions

 WebBunchCrossingTool (const std::string &name="WebBunchCrossingTool")
 Create a proper constructor for Athena.
StatusCode loadConfig (int bgkey)
 Load a given bunch group key.
StatusCode loadConfig (unsigned int run, unsigned int lb)
 Load the configuration of a given LB.

Protected Member Functions

virtual StatusCode beginEvent ()
 Function called at the beginning of each event.

Detailed Description

Bunch crossing tool reading the configuration from the web.

The atlas-trigconf.cern.ch webpage now provides the bunch crossing configuration as JSON data as well. This tool can be used to read this configuration directly from the webpage.

Internally the tool uses ROOT's TSocket to communicate with the webpage.

The tool tries to minimise the times it needs to contact the webserver, but still, it's not supposed to be the fastest implementation of the interface.

Author:
Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
Revision
657759
Date
2015-03-30 13:08:15 +0200 (Mon, 30 Mar 2015)

Constructor & Destructor Documentation

Trig::WebBunchCrossingTool::WebBunchCrossingTool ( const std::string &  name = "WebBunchCrossingTool"  ) 

Create a proper constructor for Athena.

Default constructor


Member Function Documentation

StatusCode Trig::WebBunchCrossingTool::beginEvent (  )  [protected, virtual]

Function called at the beginning of each event.

This function takes care of keeping the tool up to date with the correct configuration for the currently loaded event. It needs the EventInfo object to do so.

Returns:
StatusCode::SUCCESS if the right configuration could be loaded, or StatusCode::FAILURE if not.

Reimplemented from asg::AsgMetadataTool.

StatusCode Trig::WebBunchCrossingTool::loadConfig ( unsigned int  run,
unsigned int  lb 
)

Load the configuration of a given LB.

This function can be used to load the bunch structure information for a given run and luminosity block number.

First the function checks in its cache which BG key this period corresponds to. If the requested luminosity block is already known in the cache, then the function asks loadConfig(int) to load the configuration. If the luminosity block is not known, the function reads the configuration for the entire run from the webpage, and lets cacheJSONConfig(...) load it into the internal cache. After the new configuration is cached, the function calls itself recursively, because this time it will know right away what to do.

Parameters:
run The run number of the data you're analysing
lb The luminosity block number of the data you're analysing
Returns:
StatusCode::SUCCESS if the configuration was loaded successfully, or StatusCode::FAILURE if it wasn't
StatusCode Trig::WebBunchCrossingTool::loadConfig ( int  bgkey  ) 

Load a given bunch group key.

This is the fairly complicated function which (if necessary) loads the configuration belonging to BG key "bgkey" from either the internal cache of the tool, or from the atlas-trigconf.cern.ch webpage directly.

Parameters:
bgkey The bunch group key that should be loaded
Returns:
StatusCode::SUCCESS if the operation was successful, or StatusCode::FAILURE if it wasn't

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 15 Apr 2017 for RootCore Packages by  doxygen 1.6.1