LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
EnsureOnlyOneSchedule.h File Reference

Type whose constructor throws if more than one art schedule is configured. More...

#include "art/Utilities/Globals.h"
#include "canvas/Utilities/Exception.h"
#include "cetlib_except/demangle.h"

Go to the source code of this file.

Classes

class  lar::EnsureOnlyOneSchedule< T >
 

Namespaces

 lar
 LArSoft-specific namespace.
 

Detailed Description

Type whose constructor throws if more than one art schedule is configured.

This class is intended to be used in the context of an art job. It is helpful for services that have the notion of a "current event," but are thread-safe within that event. The constructor of this class will throw an exception if more than one art schedule is configured. It should be used via private inheritance:

class MyService : lar::EnsureOnlyOneSchedule<MyService> { .. };

Definition in file EnsureOnlyOneSchedule.h.